]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - resources/src/jquery/jquery.placeholder.js
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / resources / src / jquery / jquery.placeholder.js
diff --git a/resources/src/jquery/jquery.placeholder.js b/resources/src/jquery/jquery.placeholder.js
new file mode 100644 (file)
index 0000000..afb8837
--- /dev/null
@@ -0,0 +1,18 @@
+/*!
+ * No-op for compatibility with code from before we used
+ * native placeholder in all supported browsers.
+ */
+
+( function ( $ ) {
+       var placeholder;
+
+       placeholder = $.fn.placeholder = function ( text ) {
+               if ( arguments.length ) {
+                       this.prop( 'placeholder', text );
+               }
+               return this;
+       };
+
+       placeholder.input = placeholder.textarea = true;
+
+}( jQuery ) );