From 5941fcea25fc7e82f7bc134289647381edd19096 Mon Sep 17 00:00:00 2001 From: Pier-Olivier Thibault Date: Thu, 14 Jun 2012 12:03:38 -0400 Subject: [PATCH] Using dropdownZIndex as opts. Dropping default value so use can set it via css. --- select2.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/select2.js b/select2.js index 7ac2f77d..55836c72 100755 --- a/select2.js +++ b/select2.js @@ -539,7 +539,6 @@ formatInputTooShort: function (input, min) { return "Please enter " + (min - input.length) + " more characters"; }, minimumResultsForSearch: 0, minimumInputLength: 0, - zIndex: 2000, id: function (e) { return e.id; }, matcher: function(term, text) { return text.toUpperCase().indexOf(term.toUpperCase()) >= 0; @@ -650,13 +649,15 @@ var offset = this.container.offset(); var height = this.container.outerHeight(); var width = this.container.outerWidth(); - - this.dropdown.css({ + var css = { top: offset.top + height, left: offset.left, - width: width, - "z-index": this.opts.zIndex - }); + width: width + } + if (this.opts.dropdownZIndex !== undefined) { + css["z-index"] = this.opts.dropdownZIndex + } + this.dropdown.css(css); }, open: function () {