I'm trying to solve a situation where you have two select lists and on first and second option from first list, second list gets enabled.
Ok, I have #decide
and #day
select lists, #day
is disabled by default. If User would select option yes:
or maybe:
from #decide
list, #day
list would get enabled with
$('#day').prop('disabled', false);
else or if the any other option is selected it would give back that disabled property to #day:
$('#day').prop('disabled', true);
currently I have only html:
<select id="decide" name="decide" class="span4">
<option value="0" selected="selected">--</option>
<option value="yes">yes:</option>
<option value="maybe">maybe:</option>
<option value="no">no</option>
<option value="nevermind">nevermind</option>
</select>
<select id="day" name="day" class="span4" disabled>
<option value="0" selected="selected">--</option>
<option value="1">monday</option>
<option value="2">tuesday</option>
<option value="3">saturday</option>
<option value="4">sunday</option>
</select>
and idea to solve it with parts of jquery code qouted
here is jsfiddle with current situation: http://jsfiddle.net/3hwzK/