-/**
+/*!
* HTML5 placeholder emulation for jQuery plugin
*
* This will automatically use the HTML5 placeholder attribute if supported, or emulate this behavior if not.
* @version 2.1.0
* @license MIT
*/
+
( function ( $ ) {
var isInputSupported = 'placeholder' in document.createElement( 'input' ),
if ( input.type === 'password' ) {
if ( !$input.data( 'placeholder-textinput' ) ) {
try {
- $replacement = $input.clone().attr( { 'type': 'text' } );
+ $replacement = $input.clone().attr( { type: 'text' } );
} catch ( e ) {
- $replacement = $( '<input>' ).attr( $.extend( args( this ), { 'type': 'text' } ) );
+ $replacement = $( '<input>' ).attr( $.extend( args( this ), { type: 'text' } ) );
}
$replacement
.removeAttr( 'name' )
placeholder.textarea = isTextareaSupported;
hooks = {
- 'get': function ( element ) {
+ get: function ( element ) {
var $element = $( element ),
$passwordInput = $element.data( 'placeholder-password' );
if ( $passwordInput ) {
return $element.data( 'placeholder-enabled' ) && $element.hasClass( 'placeholder' ) ? '' : element.value;
},
- 'set': function ( element, value ) {
+ set: function ( element, value ) {
var $element = $( element ),
$passwordInput = $element.data( 'placeholder-password' );
if ( $passwordInput ) {