mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Make sure that jQuery works even when the individual modules are loaded separately AND jQuery.noConflict(true) is used. Fixes #7011.
This commit is contained in:
parent
b920f0aeb4
commit
a44ec40277
@ -1,3 +1,5 @@
|
||||
(function( jQuery ) {
|
||||
|
||||
var jsc = jQuery.now(),
|
||||
rscript = /<script(.|\s)*?\/script>/gi,
|
||||
rselectTextarea = /select|textarea/i,
|
||||
@ -686,3 +688,5 @@ jQuery.extend( jQuery.ajax, {
|
||||
|
||||
// For backwards compatibility
|
||||
jQuery.extend( jQuery.ajax );
|
||||
|
||||
})( jQuery );
|
||||
|
@ -1,3 +1,5 @@
|
||||
(function( jQuery ) {
|
||||
|
||||
var rclass = /[\n\t]/g,
|
||||
rspace = /\s+/,
|
||||
rreturn = /\r/g,
|
||||
@ -341,3 +343,5 @@ jQuery.extend({
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
|
@ -1,3 +1,5 @@
|
||||
(function( jQuery ) {
|
||||
|
||||
var ralpha = /alpha\([^)]*\)/,
|
||||
ropacity = /opacity=([^)]*)/,
|
||||
rdashAlpha = /-([a-z])/ig,
|
||||
@ -238,3 +240,5 @@ if ( jQuery.expr && jQuery.expr.filters ) {
|
||||
return !jQuery.expr.filters.hidden( elem );
|
||||
};
|
||||
}
|
||||
|
||||
})( jQuery );
|
||||
|
@ -1,3 +1,5 @@
|
||||
(function( jQuery ) {
|
||||
|
||||
var windowData = {};
|
||||
|
||||
jQuery.extend({
|
||||
@ -165,3 +167,5 @@ jQuery.fn.extend({
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
|
@ -1,3 +1,5 @@
|
||||
(function( jQuery ) {
|
||||
|
||||
// Create innerHeight, innerWidth, outerHeight and outerWidth methods
|
||||
jQuery.each([ "Height", "Width" ], function( i, name ) {
|
||||
|
||||
@ -55,3 +57,5 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
|
4
src/effects.js
vendored
4
src/effects.js
vendored
@ -1,3 +1,5 @@
|
||||
(function( jQuery ) {
|
||||
|
||||
var elemdisplay = {},
|
||||
rfxtypes = /toggle|show|hide/,
|
||||
rfxnum = /^([+\-]=)?([\d+.\-]+)(.*)$/,
|
||||
@ -480,3 +482,5 @@ if ( jQuery.expr && jQuery.expr.filters ) {
|
||||
}).length;
|
||||
};
|
||||
}
|
||||
|
||||
})( jQuery );
|
||||
|
@ -1,3 +1,5 @@
|
||||
(function( jQuery ) {
|
||||
|
||||
var rnamespaces = /\.(.*)$/,
|
||||
fcleanup = function( nm ) {
|
||||
return nm.replace(/[^\w\s\.\|`]/g, function( ch ) {
|
||||
@ -1109,3 +1111,5 @@ if ( window.attachEvent && !window.addEventListener ) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
})( jQuery );
|
||||
|
@ -1,3 +1,5 @@
|
||||
(function( jQuery ) {
|
||||
|
||||
var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
|
||||
rleadingWhitespace = /^\s+/,
|
||||
rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g,
|
||||
@ -599,4 +601,6 @@ function evalScript( i, elem ) {
|
||||
if ( elem.parentNode ) {
|
||||
elem.parentNode.removeChild( elem );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})( jQuery );
|
||||
|
@ -1,3 +1,5 @@
|
||||
(function( jQuery ) {
|
||||
|
||||
if ( "getBoundingClientRect" in document.documentElement ) {
|
||||
jQuery.fn.offset = function( options ) {
|
||||
var elem = this[0];
|
||||
@ -281,3 +283,5 @@ function getWindow( elem ) {
|
||||
elem.defaultView || elem.parentWindow :
|
||||
false;
|
||||
}
|
||||
|
||||
})( jQuery );
|
||||
|
@ -1,3 +1,5 @@
|
||||
(function( jQuery ) {
|
||||
|
||||
jQuery.extend({
|
||||
queue: function( elem, type, data ) {
|
||||
if ( !elem ) {
|
||||
@ -88,3 +90,5 @@ jQuery.fn.extend({
|
||||
return this.queue( type || "fx", [] );
|
||||
}
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
|
@ -1,3 +1,5 @@
|
||||
(function( jQuery ) {
|
||||
|
||||
(function() {
|
||||
|
||||
jQuery.support = {};
|
||||
@ -132,7 +134,7 @@
|
||||
|
||||
// release memory in IE
|
||||
root = script = div = all = a = null;
|
||||
})();
|
||||
})( jQuery );
|
||||
|
||||
jQuery.props = {
|
||||
"for": "htmlFor",
|
||||
@ -146,3 +148,5 @@ jQuery.props = {
|
||||
usemap: "useMap",
|
||||
frameborder: "frameBorder"
|
||||
};
|
||||
|
||||
})( jQuery );
|
||||
|
@ -1,3 +1,5 @@
|
||||
(function( jQuery ) {
|
||||
|
||||
var runtil = /Until$/,
|
||||
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
|
||||
// Note: This RegExp should be improved, or likely pulled from Sizzle
|
||||
@ -271,3 +273,5 @@ function winnow( elements, qualifier, keep ) {
|
||||
return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
|
||||
});
|
||||
}
|
||||
|
||||
})( jQuery );
|
||||
|
@ -183,7 +183,7 @@ test("browser", function() {
|
||||
}
|
||||
|
||||
test("noConflict", function() {
|
||||
expect(6);
|
||||
expect(7);
|
||||
|
||||
var $$ = jQuery;
|
||||
|
||||
@ -196,6 +196,7 @@ test("noConflict", function() {
|
||||
equals( jQuery.noConflict(true), $$, "noConflict returned the jQuery object" );
|
||||
equals( jQuery, originaljQuery, "Make sure jQuery was reverted." );
|
||||
equals( $, original$, "Make sure $ was reverted." );
|
||||
ok( $$("#main").html("test"), "Make sure that jQuery still works." );
|
||||
|
||||
jQuery = $$;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user