Code:
<select id="firstSelect">
<option selected>All</option>
<option value="Orange">Orange</option>
<option value="Apple">Apple</option>
<option value="Lemon">Lemon</option>
</select>
<select id="secondSelect">
<option selected>All</option>
<option value="Cat">Cat</option>
<option value="Dog">Dog
<option>
</select>
<script>
$(document).ready(function () {
$("#secondSelect").on('change', function () {
$("#firstSelect").val($("#firstSelect option:first").val());
});
});
</script>
Comments
Post a Comment
If you any doubt of any topic then you can comment me.