-
Notifications
You must be signed in to change notification settings - Fork 3
jQuery dropdownlist events
Maikel Bos edited this page Jan 9, 2020
·
6 revisions
The jQuery-dropdownlist provides a number of events that you can subscribe to with the jQuery syntax.
<script type="text/javascript">
$('#example-dropdown').on('dropdownlist.selectedItemsChanged', function (event, items, values) {
console.log("New selection: " + values);
})
</script>
-
dropdownlist.selectedItemsChanged
fires whenever a user took action to change the selection in the dropdownlist; it provides an array of selected items in its second parameter and an array of selected values in its third parameter -
dropdownlist.shown
fires whenever a dropdownlist is opened either programmatically or via user interaction -
dropdownlist.hidden
fires whenever a dropdownlist is closed either programmatically or via user interaction