Merge "Add maintenance/view.php for viewing page contents"
[lhc/web/wiklou.git] / resources / src / jquery / jquery.placeholder.js
index 9c18a91..12b0404 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*!
  * HTML5 placeholder emulation for jQuery plugin
  *
  * This will automatically use the HTML5 placeholder attribute if supported, or emulate this behavior if not.
@@ -13,6 +13,7 @@
  * @version 2.1.0
  * @license MIT
  */
+
 ( function ( $ ) {
 
        var isInputSupported = 'placeholder' in document.createElement( 'input' ),
@@ -34,7 +35,7 @@
        function args( elem ) {
                // Return an object of element attributes
                var newAttrs = {},
-                               rinlinejQuery = /^jQuery\d+$/;
+                       rinlinejQuery = /^jQuery\d+$/;
                $.each( elem.attributes, function ( i, attr ) {
                        if ( attr.specified && !rinlinejQuery.test( attr.name ) ) {
                                newAttrs[ attr.name ] = attr.value;
@@ -45,7 +46,7 @@
 
        function clearPlaceholder( event, value ) {
                var input = this,
-                               $input = $( input );
+                       $input = $( input );
                if ( input.value === $input.attr( 'placeholder' ) && $input.hasClass( 'placeholder' ) ) {
                        if ( $input.data( 'placeholder-password' ) ) {
                                $input = $input.hide().next().show().attr( 'id', $input.removeAttr( 'id' ).data( 'placeholder-id' ) );
@@ -67,9 +68,9 @@
 
        function setPlaceholder() {
                var $replacement,
-                               input = this,
-                               $input = $( input ),
-                               id = this.id;
+                       input = this,
+                       $input = $( input ),
+                       id = this.id;
                if ( !input.value ) {
                        if ( input.type === 'password' ) {
                                if ( !$input.data( 'placeholder-textinput' ) ) {
@@ -84,7 +85,7 @@
                                                                'placeholder-password': $input,
                                                                'placeholder-id': id
                                                        } )
-                                                       .bind( 'focus.placeholder drop.placeholder', clearPlaceholder );
+                                                       .on( 'focus.placeholder drop.placeholder', clearPlaceholder );
                                        $input
                                                        .data( {
                                                                'placeholder-textinput': $replacement,
 
        function changePlaceholder( text ) {
                var hasArgs = arguments.length,
-                               $input = this;
+                       $input = this;
                if ( hasArgs ) {
                        if ( $input.attr( 'placeholder' ) !== text ) {
                                $input.prop( 'placeholder', text );
                                .filter( function () {
                                        return !$( this ).data( 'placeholder-enabled' );
                                } )
-                               .bind( {
+                               .on( {
                                        'focus.placeholder drop.placeholder': clearPlaceholder,
                                        'blur.placeholder': setPlaceholder
                                } )
                } );
 
                // Clear placeholder values upon page reload
-               $( window ).bind( 'beforeunload.placeholder', function () {
+               $( window ).on( 'beforeunload.placeholder', function () {
                        $( '.placeholder' ).each( function () {
                                this.value = '';
                        } );