From 38b9d060b116fc4957110f25b03b8437be981136 Mon Sep 17 00:00:00 2001 From: Andy Fowler Date: Wed, 13 Jun 2012 18:06:41 -0400 Subject: [PATCH] make getPlaceholder() compatible with jquery 1.4 (doesn't check data- attrs when using .data()) --- select2.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/select2.js b/select2.js index e2a8db5c..e35f4249 100755 --- a/select2.js +++ b/select2.js @@ -809,7 +809,10 @@ }, getPlaceholder: function () { - return this.opts.element.attr("placeholder") || this.opts.element.data("placeholder") || this.opts.placeholder; + return this.opts.element.attr("placeholder") || + this.opts.element.attr("data-placeholder") || // jquery 1.4 compat + this.opts.element.data("placeholder") || + this.opts.placeholder; }, /**