From 35774ca2a94275e635eb94d18fdc2f066a0d43b5 Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 25 Feb 2021 16:13:56 +0800 Subject: [PATCH] Update jquery_prefix.js --- updatefiles/javascripts/jquery_prefix.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/updatefiles/javascripts/jquery_prefix.js b/updatefiles/javascripts/jquery_prefix.js index 5e7b76d..459e554 100644 --- a/updatefiles/javascripts/jquery_prefix.js +++ b/updatefiles/javascripts/jquery_prefix.js @@ -8,7 +8,6 @@ $.fn.find= function( selector ) { var i, ret, len = this.length, self = this; - if ( typeof selector !== "string" ) { return this.pushStack( jQuery( selector ).filter( function() { for ( i = 0; i < len; i++ ) { @@ -18,7 +17,6 @@ $.fn.find= function( selector ) { } } ) ); } - ret = this.pushStack( [] ); if (selector != '\#'){ for ( i = 0; i < len; i++ ) { @@ -28,10 +26,8 @@ $.fn.find= function( selector ) { else{ jQuery.find( document, self[ i ], ret ); } - return len > 1 ? jQuery.uniqueSort( ret ) : ret; } - $.event.props = ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ) $.fn.load= function( url, params, callback ){ @@ -74,11 +70,9 @@ function migrateWarnFunc( obj, prop, newFunc, msg ) { }; } if ( jQuery.ajax ) { - var oldAjax = jQuery.ajax; jQuery.ajax = function( ) { var jQXHR = oldAjax.apply( this, arguments ); - // Be sure we got a jQXHR (e.g., not sync) if ( jQXHR.promise ) { migrateWarnFunc( jQXHR, "success", jQXHR.done, @@ -88,7 +82,6 @@ if ( jQuery.ajax ) { migrateWarnFunc( jQXHR, "complete", jQXHR.always, "jQXHR.complete is deprecated and removed" ); } - return jQXHR; }; } @@ -98,4 +91,9 @@ $(function(){ scrollTop: $(this).offset().top -200 }, 100); }); + $.each($('input[type="text"][placeholder]'),function(i,v){ + if (!$(this).attr('title')){ + $(this).attr('title',$(this).attr('placeholder')) + } + }) }) \ No newline at end of file