Update jquery_prefix.js

This commit is contained in:
chiu 2021-02-25 16:13:56 +08:00
parent abca9b7f26
commit 35774ca2a9
1 changed files with 5 additions and 7 deletions

View File

@ -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'))
}
})
})