From 71e0ea57e886903df2cbae8fb67b3a54aa3257d4 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Sat, 9 Feb 2013 16:47:23 -0800 Subject: [PATCH] catch up to mater --- select2-latest.html | 38 ++++++++++++++++++++++++++++++++++---- select2-master | 2 +- 2 files changed, 35 insertions(+), 5 deletions(-) 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));}); });
@@ -1577,6 +1581,32 @@ $("#tags").select2({

+
+
+

selected

+

Fired when a choice is selected in the dropdown.

+

+

The event object contains the following custom properties: +

+
val
the id of the highlighted choice object
+
object
the highlighted choice object
+
+

+
+
+
+
+

removed

+

Fired when a choice is removed or cleared

+

+

The event object contains the following custom properties: +

+
val
the id of the highlighted choice object
+
object
the highlighted choice object
+
+

+
+
diff --git a/select2-master b/select2-master index d5437856..a4c76f2d 160000 --- a/select2-master +++ b/select2-master @@ -1 +1 @@ -Subproject commit d54378563c3a9d7cda535a115cedb6abe9ac0b12 +Subproject commit a4c76f2dfb0b9a438c59a8a7409d2e7bf1ef16bf