Basically I have a select option which pulls all the 'Tour Names' from a database as $touroptions. $touroptions can contain anything from 1-20 values (select options).
What I need to do is have a jQuery function to do as follows so:-
If (any option) #sel-destination-tour is selected { //DO SOMETHING } ELSE { //DO SOMETHING ELSE }
I'm just not sure how I could do this.
HTML
<select name="sel-destination-tour" id="sel-destination-tour" class="input-select-tour"> <option value="0"></option> <?php echo $touroptions ?> </select>
You can check whether a option by testing the value attribute of the select
if($('#sel-destination-tour').val()){ // do something } else { // do something else }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With