mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Removing remaining strict-mode warnings.
This commit is contained in:
parent
77344f4c50
commit
0935f4a0b1
@ -680,7 +680,7 @@ jQuery.extend({
|
|||||||
|
|
||||||
// Return the named cache data, or the ID for the element
|
// Return the named cache data, or the ID for the element
|
||||||
return name ?
|
return name ?
|
||||||
jQuery.cache[ id ][ name ] :
|
jQuery.cache[ id ][ name ] || null :
|
||||||
id;
|
id;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1163,12 +1163,12 @@ jQuery.extend({
|
|||||||
// Also, we need to make sure that the correct elements are being returned
|
// Also, we need to make sure that the correct elements are being returned
|
||||||
// (IE returns comment nodes in a '*' query)
|
// (IE returns comment nodes in a '*' query)
|
||||||
if ( jQuery.browser.msie ) {
|
if ( jQuery.browser.msie ) {
|
||||||
while ( elem = second[ i++ ] )
|
while ( (elem = second[ i++ ]) )
|
||||||
if ( elem.nodeType != 8 )
|
if ( elem.nodeType != 8 )
|
||||||
first[ pos++ ] = elem;
|
first[ pos++ ] = elem;
|
||||||
|
|
||||||
} else
|
} else
|
||||||
while ( elem = second[ i++ ] )
|
while ( (elem = second[ i++ ]) )
|
||||||
first[ pos++ ] = elem;
|
first[ pos++ ] = elem;
|
||||||
|
|
||||||
return first;
|
return first;
|
||||||
|
@ -40,8 +40,9 @@ jQuery.event = {
|
|||||||
handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){
|
handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){
|
||||||
// Handle the second event of a trigger and when
|
// Handle the second event of a trigger and when
|
||||||
// an event is called after a page has unloaded
|
// an event is called after a page has unloaded
|
||||||
if ( typeof jQuery !== "undefined" && !jQuery.event.triggered )
|
return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
|
||||||
return jQuery.event.handle.apply(arguments.callee.elem, arguments);
|
jQuery.event.handle.apply(arguments.callee.elem, arguments) :
|
||||||
|
undefined;
|
||||||
});
|
});
|
||||||
// Add elem as a property of the handle function
|
// Add elem as a property of the handle function
|
||||||
// This is to prevent a memory leak with non-native
|
// This is to prevent a memory leak with non-native
|
||||||
|
@ -131,7 +131,7 @@ jQuery.each( ['Left', 'Top'], function(i, name) {
|
|||||||
var method = 'scroll' + name;
|
var method = 'scroll' + name;
|
||||||
|
|
||||||
jQuery.fn[ method ] = function(val) {
|
jQuery.fn[ method ] = function(val) {
|
||||||
if (!this[0]) return;
|
if (!this[0]) return null;
|
||||||
|
|
||||||
return val !== undefined ?
|
return val !== undefined ?
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user