diff --git a/select2-latest.html b/select2-latest.html index 00cd1dd9..3a4341ca 100644 --- a/select2-latest.html +++ b/select2-latest.html @@ -633,15 +633,19 @@ function log(e) { e.animate({opacity:1}, 10000, 'linear', function() { e.animate({opacity:0}, 2000, 'linear', function() {e.remove(); }); }); } $("#e11") - .on("change", function(e) { log(JSON.stringify({val:e.val, added:e.added, removed:e.removed})); }) + .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("highlight", function(e) { log ("highlighted val="+ e.val+" choice="+ JSON.stringify(e.choice));}); + .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));}); $("#e11_2") - .on("change", function(e) { log(JSON.stringify({val:e.val, added:e.added, removed:e.removed})); }) + .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("highlight", function(e) { log ("highlighted val="+ e.val+" choice="+ JSON.stringify(e.choice));}); + .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));}); });
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: +