How do I get the value of a selected element in the below example? The ‘change’ handler is being fired as expected but where on earth is the value?
JavaScrip:
$("#test").bind('change', function(event, ui)
{
alert(ui.value); // ????!!!!
});
HTML:
<select id="test" data-native-menu="false">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
Try this: