ehynds / jquery-ui-multiselect-widget

jQuery UI MultiSelect widget

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Version 3 Method: Value only returning value of native select NOT setting value

opened this issue · comments

What is the current behavior?

There is not enough documentation to use the version 3 method value. I am trying to learn how to use the new method value to set the value of the native select and resynchronize the widget.

The code only returns the value of the multiselect wodget NOT set the native select.
$('#function).multiselect().val();

The documentation only tells me

Value
Returns the value of the native select or sets it and re-synchronizes the widget.

Parameter:

newValue (optional) The new value to set.

What is the expected behavior?

I have initialize the multiselect widget. I click an option on the multiselect widget. I am trying to get the value I use on the widget to be set on the native select and resynced to the widget.

I am trying to use the value method to change the native select to whatever the multiselect widget is changed to. Do I need to apply the value method to a multiselect onchange event?