Browse Source

Added support for placeholder attribute in addition to data-placeholder

Dean Sofer 13 years ago
parent
commit
945249f46a
1 changed files with 1 additions and 3 deletions
  1. 1 3
      select2.js

+ 1 - 3
select2.js

@@ -756,9 +756,7 @@
         },
         },
 
 
         getPlaceholder: function () {
         getPlaceholder: function () {
-            var placeholder = this.opts.element.data("placeholder");
-            if (placeholder !== undefined) return placeholder;
-            return this.opts.placeholder;
+            return this.opts.element.attr("placeholder") || this.opts.element.data("placeholder") || this.opts.placeholder;
         },
         },
 
 
         /**
         /**