From 945249f46a93df81ca4e9b80a364e186974935fb Mon Sep 17 00:00:00 2001 From: Dean Sofer Date: Wed, 2 May 2012 20:19:00 -0700 Subject: [PATCH] Added support for placeholder attribute in addition to data-placeholder --- select2.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/select2.js b/select2.js index 5abe5b9b..7b55f75a 100755 --- a/select2.js +++ b/select2.js @@ -756,9 +756,7 @@ }, 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; }, /**