浏览代码

Merge pull request #173 from nutshellcrm/38b9d060b116fc4957110f25b03b8437be981136

Fix placeholders in jQuery 1.4
Igor Vaynberg 13 年之前
父节点
当前提交
b886b40907
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      select2.js

+ 4 - 1
select2.js

@@ -1000,7 +1000,10 @@
 
         // abstract
         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;
         },
 
         /**