From c5771585995fdae539f06d8a1542b6b57dc03188 Mon Sep 17 00:00:00 2001 From: brettmas Date: Fri, 21 Sep 2012 02:39:58 +1000 Subject: [PATCH] original option not available to formatSelection on init The original option isn't available to formatSelection when initializing the selection from a select[multiple] --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 32c51cbb..9a08f750 100644 --- a/select2.js +++ b/select2.js @@ -1790,7 +1790,7 @@ var data = []; element.find(":selected").each2(function (i, elm) { - data.push({id: elm.attr("value"), text: elm.text()}); + data.push({id: elm.attr("value"), text: elm.text(), element: elm}); }); if ($.isFunction(callback))