I am using selectmenu plugin for my select list. I want to change the selected value of the selectlist using jquery. I tried :
$('select').val("new selected value");
$('select').selectmenu("value", "new selected value");
But both of the above are not working. Help me out please?
The Doc says following
And this works also. Check this out
EDIT
The problem could be, your “New Value” must not be matching from list of options you have for the select list. The text should match exactly.
In my example, try changing this line
$('select').selectmenu("value", "An Army")toAnd see this wont work either