From 7d8409393c994d6df7bb9df59ab168d8cb562ace Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Wed, 23 Jan 2013 08:57:10 -0800 Subject: [PATCH] fix parenthesis mismatches --- select2.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/select2.js b/select2.js index 49820ad1..0ec9599a 100644 --- a/select2.js +++ b/select2.js @@ -1432,7 +1432,7 @@ the specific language governing permissions and limitations under the Apache Lic // single createContainer: function () { - var container = $(document.createElement("div").attr({ + var container = $(document.createElement("div")).attr({ "class": "select2-container" }).html([ " ", @@ -1445,7 +1445,7 @@ the specific language governing permissions and limitations under the Apache Lic " " , " " , - ""].join(""))); + ""].join("")); return container; }, @@ -1667,11 +1667,11 @@ the specific language governing permissions and limitations under the Apache Lic // install default initSelection when applied to hidden input and data is local opts.initSelection = opts.initSelection || function (element, callback) { var id = element.val(); - //search in data by id + //search in data by id opts.query({ matcher: function(term, text, el){ return equal(id, opts.id(el)); - }, + }, callback: !$.isFunction(callback) ? $.noop : function(filtered) { callback(filtered.results.length ? filtered.results[0] : null); } @@ -1830,7 +1830,7 @@ the specific language governing permissions and limitations under the Apache Lic // multi createContainer: function () { - var container = $(document.createElement("div").attr({ + var container = $(document.createElement("div")).attr({ "class": "select2-container select2-container-multi" }).html([ "