diff --git a/select2-latest.html b/select2-latest.html index 6870dc0c..2bd14f5f 100644 --- a/select2-latest.html +++ b/select2-latest.html @@ -660,22 +660,26 @@ function log(e) { } $("#e11") .on("change", function(e) { log("change "+JSON.stringify({val:e.val, added:e.added, removed:e.removed})); }) - .on("opening", function() { log("opening"); }) - .on("open", function() { log("open"); }) - .on("close", function() { log("close"); }) - .on("highlight", function(e) { log ("highlighted val="+ e.val+" choice="+ JSON.stringify(e.choice));}) - .on("selected", function(e) { log ("selected val="+ e.val+" choice="+ JSON.stringify(e.choice));}) - .on("removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));}) - .on("loaded", function(e) { log ("loaded (data property omitted for brevitiy)");}); + .on("select2-opening", function() { log("opening"); }) + .on("select2-open", function() { log("open"); }) + .on("select2-close", function() { log("close"); }) + .on("select2-highlight", function(e) { log ("highlighted val="+ e.val+" choice="+ JSON.stringify(e.choice));}) + .on("select2-selecting", function(e) { log ("selecting val="+ e.val+" choice="+ JSON.stringify(e.choice));}) + .on("select2-removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));}) + .on("select2-loaded", function(e) { log ("loaded (data property omitted for brevitiy)");}) + .on("select2-focus", function(e) { log ("focus");}) + .on("select2-blur", function(e) { log ("blur");}); $("#e11_2") .on("change", function(e) { log("change "+JSON.stringify({val:e.val, added:e.added, removed:e.removed})); }) - .on("opening", function() { log("opening"); }) - .on("open", function() { log("open"); }) - .on("close", function() { log("close"); }) - .on("highlight", function(e) { log ("highlighted val="+ e.val+" choice="+ JSON.stringify(e.choice));}) - .on("selected", function(e) { log ("selected val="+ e.val+" choice="+ JSON.stringify(e.choice));}) - .on("removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));}) - .on("loaded", function(e) { log ("loaded (data property omitted for brevitiy)");}); + .on("select2-opening", function() { log("opening"); }) + .on("select2-open", function() { log("open"); }) + .on("select2-close", function() { log("close"); }) + .on("select2-highlight", function(e) { log ("highlighted val="+ e.val+" choice="+ JSON.stringify(e.choice));}) + .on("select2-selecting", function(e) { log ("selecting val="+ e.val+" choice="+ JSON.stringify(e.choice));}) + .on("select2-removed", function(e) { log ("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));}) + .on("select2-loaded", function(e) { log ("loaded (data property omitted for brevitiy)");}) + .on("select2-focus", function(e) { log ("focus");}) + .on("select2-blur", function(e) { log ("blur");}); });
Fired before the dropdown is shown.
The event listener can prevent the opening by calling preventDefault()
on the supplied event object.
Fired after the dropdown is shown.
Fired when a choice is highlighted in the dropdown.
The event object contains the following custom properties: @@ -1631,9 +1635,9 @@ $("#select").select2({
Fired when a choice is being selected in the dropdown, but before any modification has been made to the selection.
This event is used to allow the user to reject selection by calling event.preventDefault()
Fired when a choice is selected in the dropdown.
- -The event object contains the following custom properties: -
Fired when a choice is removed or cleared
The event object contains the following custom properties: @@ -1673,7 +1664,7 @@ $("#select").select2({
Fired when query function is done loading the data and the results list has been updated
The event object contains the following custom properties: @@ -1683,8 +1674,20 @@ $("#select").select2({
Fired when the control is focussed +
+Fired when the control is blurred +
+