I have to do a event when checkbox is unchecked then select dropdown value is set to be null or default.
Html code:
<div class="checkbox">
<label><input type="checkbox" class="tomorrow-schedule-time" name="tomorrow_8am_10am" id="tomorrow_8am_10am" value="8am-10am">8am - 10am</label>
<i class="tomorrow_8am_10am box">
<select name="pref_tomorrow_8am_10am">
<option value="-1">No Preferences</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</i>
</div>
<div class="checkbox">
<label><input type="checkbox" class="tomorrow-schedule-time" name="tomorrow_10am_12pm" id="tomorrow_10am_12pm" value="10am-12pm">10am - 12pm</label>
<i class="tomorrow_10am_12pm box">
<select name="pref_tomorrow_10am_12pm">
<option value="-1">No Preferences</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</i>
</div>
<div class="checkbox ">
<label><input type="checkbox" class="tomorrow-schedule-time" name="tomorrow_12pm_2pm" id="tomorrow_12pm_2pm" value="12pm-2pm">12pm - 2pm</label>
<i class="tomorrow_12pm_2pm box">
<select name="pref_tomorrow_12pm_2pm">
<option value="-1">No Preferences</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</i>
</div>
In above code i am append/show dropdown on click of checkbox. Now i have to do this when i uncheck the checkbox at that time set the value of dropdown to be null/default.
Can anyone help me for that?
Aucun commentaire:
Enregistrer un commentaire