Note that there are some explanatory texts on larger screens.

plurals
  1. POshow hidden div based on dropdown selection
    primarykey
    data
    text
    <p>I have a Member Registration Form that contains a dropdown. It is for events so firstly they enter their membership details, select an event and then the number of tickets they wish to purchase. The options are as follows:</p> <ul> <li>Member</li> <li>Member + 1 Guest</li> <li>Member + 2 Guests</li> <li>Member + 3 Guests, and so on.</li> </ul> <p>What I want to happen is that because "Members" are FREE to attend, I want to keep the payment div hidden unless they select Member + xxxx.</p> <p>I am a complete novice when it comes to javascript/jquery but I can understand most of it when its written.</p> <p>I have a JSfiddle (<a href="http://jsfiddle.net/bEuRh/" rel="nofollow">http://jsfiddle.net/bEuRh/</a>) created with some basics but I need a hand writing the script. Some of the code is below:</p> <pre><code>&lt;div id="tickets"&gt; &lt;label for="CAT_Custom_255276"&gt;Number of Tickets: &lt;span class="req"&gt;*&lt;/span&gt;&lt;/label&gt; &lt;select class="cat_dropdown" id="CAT_Custom_255276" name="CAT_Custom_255276"&gt; &lt;option value=" "&gt;-- Please select --&lt;/option&gt; &lt;option value="Member"&gt;Member&lt;/option&gt; &lt;option value="Member + 1 Guest"&gt;Member + 1 Guest&lt;/option&gt; &lt;option value="Member + 2 Guests"&gt;Member + 2 Guests&lt;/option&gt; &lt;option value="Member + 3 Guest"&gt;Member + 3 Guests&lt;/option&gt; &lt;/select&gt; &lt;/div&gt; &lt;div id="payMethod"&gt; &lt;div class="header"&gt; PAYMENT METHOD &lt;/div&gt; &lt;div id="payOptions"&gt; &lt;div id="payInfo"&gt; &lt;div id="pay0" class="paymentinfo"&gt; &lt;p&gt;PAYMENT INFO OPTION 1&lt;/p&gt; &lt;/div&gt; &lt;div id="pay1" class="paymentinfo"&gt; &lt;p&gt;PAYMENT INFO OPTION 2&lt;/p&gt; &lt;/div&gt; &lt;div id="pay2" class="paymentinfo"&gt; &lt;p&gt;PAYMENT INFO OPTION 3&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>If anyone could please assist, that would be greatly appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload