jQuery selectmenu plugin value

3.5k Views Asked by At

I'm using the jQuery UI Selectmenu Plugin for styling my select fields. Now I have a general question to bring this code $(this).val() to work with this plugin. After the onChange event it should me give out the value of the current select field.

Many thanks!

2

There are 2 best solutions below

0
On BEST ANSWER

From the docs -

VALUE Retrieves or selects the value of the current option.

// read
$('select#speedA').selectmenu("value")
// write
$('select#speedA').selectmenu("value", "VALUE")
0
On
$('#select_id').selectmenu('widget').find('option:selected').val()