From e716ad01e18a3e577bed5d2fc6168971810e5172 Mon Sep 17 00:00:00 2001 From: Dementiy Kalkov Date: Fri, 10 Oct 2014 13:32:58 +0400 Subject: [PATCH] 'document.body' instead of 'body' selector --- select2.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/select2.js b/select2.js index 4d2b4e24..f220a9a8 100644 --- a/select2.js +++ b/select2.js @@ -132,7 +132,7 @@ the specific language governing permissions and limitations under the Apache Lic function measureScrollbar () { var $template = $( MEASURE_SCROLLBAR_TEMPLATE ); - $template.appendTo('body'); + $template.appendTo(document.body); var dim = { width: $template.width() - $template[0].clientWidth, @@ -311,7 +311,7 @@ the specific language governing permissions and limitations under the Apache Lic whiteSpace: "nowrap" }); sizer.attr("class","select2-sizer"); - $("body").append(sizer); + $(document.body).append(sizer); } sizer.text(e.val()); return sizer.width(); @@ -717,7 +717,7 @@ the specific language governing permissions and limitations under the Apache Lic this.container.attr("title", opts.element.attr("title")); - this.body = $("body"); + this.body = $(document.body); syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);