From 567cb7dbe762c923d9645a5d723bc511bf0d8460 Mon Sep 17 00:00:00 2001 From: Schlogen Date: Tue, 22 Jan 2013 17:00:38 -0500 Subject: [PATCH] Fix for jQuery 1.9 --- select2.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/select2.js b/select2.js index 39e62947..8fd59783 100644 --- a/select2.js +++ b/select2.js @@ -244,7 +244,7 @@ the specific language governing permissions and limitations under the Apache Lic function measureTextWidth(e) { if (!sizer){ var style = e[0].currentStyle || window.getComputedStyle(e[0], null); - sizer = $("
").css({ + sizer = $(document.createElement("div")).css({ position: "absolute", left: "-10000px", top: "-10000px", @@ -725,7 +725,7 @@ the specific language governing permissions and limitations under the Apache Lic if (compound) { node.addClass("select2-result-with-children"); } node.addClass(self.opts.formatResultCssClass(result)); - label=$("
"); + label=$(document.createElement("div")); label.addClass("select2-result-label"); formatted=opts.formatResult(result, label, query); @@ -1432,7 +1432,7 @@ the specific language governing permissions and limitations under the Apache Lic // single createContainer: function () { - var container = $("
", { + var container = $(document.createElement("div").attr({ "class": "select2-container" }).html([ " ", @@ -1830,7 +1830,7 @@ the specific language governing permissions and limitations under the Apache Lic // multi createContainer: function () { - var container = $("
", { + var container = $(document.createElement("div").attr({ "class": "select2-container select2-container-multi" }).html([ "