Browse Source

fix body element caching for non attached elements

Ali Malrkpour 13 years ago
parent
commit
a3383141d5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -429,7 +429,7 @@
 
             this.enabled=true;
             this.container = this.createContainer();
-			this.body = opts.element.closest("body"); // cache for future access
+            this.body = $("body"); // opts.element.closest("body"); // cache for future access
 
             if (opts.element.attr("class") !== undefined) {
                 this.container.addClass(opts.element.attr("class"));