mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Return control of $ and jQuery only if it is really necessary. This make
jQuery.noConflict() callable anytime.
This commit is contained in:
parent
008e971943
commit
689d63f487
@ -373,9 +373,9 @@ jQuery.extend = jQuery.fn.extend = function() {
|
|||||||
|
|
||||||
jQuery.extend({
|
jQuery.extend({
|
||||||
noConflict: function( deep ) {
|
noConflict: function( deep ) {
|
||||||
window.$ = _$;
|
if ( window.$ === jQuery ) window.$ = _$;
|
||||||
|
|
||||||
if ( deep ) {
|
if ( deep && window.jQuery === jQuery ) {
|
||||||
window.jQuery = _jQuery;
|
window.jQuery = _jQuery;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user