-
Notifications
You must be signed in to change notification settings - Fork 683
Events
Hook into any of the events below by either binding to the event name, or passing in the name of the event during initialization:
// bind to event
$("#multiselect").bind("multiselectopen", function(event, ui){
// event handler here
});
// or pass in the handler during initialization
$("#multiselect").multiselect({
open: function(event, ui){
// event handler here
}
});
create
Requires jQuery UI Widget Factory 1.8.6+ Fires when the widget is created for the first time.
beforeopen
Fires right before the menu opens. Prevent the menu from opening by returning false in the handler.
open
Fires after the widget opens.
beforeclose
Fires right before the menu closes. Prevent the menu from closing by returning false in the handler.
close
Fires after the widget closes.
checkall
Fires when all the options are checked by either clicking the "check all" link in the header, or when the "checkall" method is programatically called (see next section).
uncheckall
Fires when all the options are all unchecked by either clicking the "uncheck all" link in the header, or when the "uncheckall" method is programatically called (see next section).
optgrouptoggle
Fires when an optgroup label is clicked on. This event receives the original event object as the first argument, and a hash of values as the second argument.
$("#multiselect").bind("multiselectoptgrouptoggle", function(event, ui){
//Function body
});
-
eventThe original event object, most likely click. -
ui.inputsAn array of checkboxes (DOM elements) inside the optgroup. -
ui.labelThe text of the optgroup. -
ui.checkedWhether or not the checkboxes were checked or unchecked in the toggle (bool value)
click
Fires when a checkbox is checked or unchecked.
$("#multiselect").on("multiselectclick", function(event, ui) {
//Function body
}
-
eventThe original event object, most likely click. -
ui.valueThe value of the checkbox. -
ui.textThe text of the checkbox. -
ui.checkedWhether or not the input was checked or unchecked.
refresh
resync
beforeoptgrouptoggle
beforecollapsetoggle
collapsetoggle
maxselected
change
resize
beforeClose
beforeCheckAll
beforeUncheckAll
'flipAll`
beforeFlipAll
beforeCollapseAll
'collapseAll`
beforeExpandAll
expandAll
input
filter
search