Reputation: 14250
I am trying to select the dropdown menu to the certain option when I click a button
I have
Html
<select id='selectmenu'>
<option>
1
</option>
<option>
2
</option>
<option>
3
</option>
</select>
<a id='click'>click</a>
Jquery
$('#click').click(function(){
var option=3;
//I want the select dropdown menu to select option 3 when I click the button.
//$('#selectmenu').select() //I think it will be something like this....
})
Thanks for the help!
Upvotes: 0
Views: 51