Issue
I have
<select id="baba">
<option>select something</option>
<option value="1">something 1</option>
<option value=2">something 2</option>
</select>
Using jQuery, what would be the easiest (less to write) way to reset the select
so the first option is selected?
Solution
Try this. This will work. $('#baba').prop('selectedIndex',0);
Check here http://jsfiddle.net/bibin_v/R4s3U/
Answered By - Bibin Velayudhan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.