Skip to content

Instantly share code, notes, and snippets.

@bangpound
Created September 20, 2016 07:22
Show Gist options
  • Save bangpound/b7d519f68195aff3a95130f763924c88 to your computer and use it in GitHub Desktop.
Save bangpound/b7d519f68195aff3a95130f763924c88 to your computer and use it in GitHub Desktop.
diff --git a/placeholder.js b/placeholder.js
index b28e272..9fa8d37 100644
--- a/placeholder.js
+++ b/placeholder.js
@@ -7,7 +7,9 @@
(function ($) {
Drupal.behaviors.placeholder = {
attach: function () {
- $("input[placeholder], textarea[placeholder]").placeholder();
+ if(typeof($("input[placeholder], textarea[placeholder]").placeholder())=='function') {
+ $("input[placeholder], textarea[placeholder]").placeholder();
+ }
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment