Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6088681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:00:47+00:00 2026-05-23T12:00:47+00:00

I have a form, one of the fields is a select field, with 5

  • 0

I have a form, one of the fields is a select field, with 5 options. When the 5th option is clicked, I want a hidden div to be shown. I want nothing to happen with the other 4 are clicked.

It works on FireFox, but no where else. After researching it a little, it seems that Chrome/IE don’t let you do the onClick firing with select. So far all suggestions have been to use onChange on the Select as a whole, but I haven’t been able to figure it out to just fire the code when the 5th option is clicked using onChange. Any help would be appreciated.

Custom proptions is set to display: none; by default. I want the div id’d *custom_proptions* to show when the option id’d *custom_proptions_option* is clicked, and also want it to re-hide itself if it is shown first, and then one of the other options are clicked.

<div class="proptions_container">

<select name="proptions" id="proptions" class="proptions">
<option value="0" class="default_proptions" id="choose_prompt">Choose your Proptions&#8230;</option>
<option value="1" class="default_proptions">Yes <strong>or</strong> No</option>
<option value="2" class="default_proptions">Before <strong>or</strong> On/After</option>
<option value="3" class="default_proptions">More than <strong>or</strong> Less than</option>
<option value="4" class="default_proptions">Better <strong>or</strong> Worse</option>
<option value="5" id="custom_proptions_option">A <strong>or</strong> B (customize below)</option>
</select>

<div id="custom_proptions">

<input name="proption_1" type="text" class="text" id="proption_1" placeholder="First Proption" />

<span id="custom_or">or</span>

<input name="proption_2" type="text" class="text" id="proption_2" placeholder="Second Proption" />

</div>

<script>
$('option#custom_proptions_option').click(function() {
$('div#custom_proptions').slideDown('slow');
});
$('option.default_proptions').click(function() {
$('div#custom_proptions').slideUp('slow');
});
</script>

</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:00:47+00:00Added an answer on May 23, 2026 at 12:00 pm

    Do it in the change event, but only for the desired value:

    <script>
        $('#proptions').change(function() {
            if ($(this).find(':selected').val() === '5') {
                $('div#custom_proptions').slideDown('slow');
            } else {
                $('div#custom_proptions').slideUp('slow');
            }
        });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two select fields in a form. Every time one of these select
I have a form and one of the fields is a check-all-that-applies type field
I have a bunch of select fields in a form. Some of the options
I have one form with several text fields and one button. When i enter
I have a form with 3 fields (simplyfied example). The first one is a
I had developed one website purely in HTML .I have my form with fields
I have an InfoPath form with several fields on, the problem is that one
I have a Symfony2 form with a variety of fields, including one optional text
I have a usual login form consisting of two input fields, one for login,
I have a form in a PHP script and one text field. However when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.