]> source.dussan.org Git - jquery.git/commitdiff
Return control of $ and jQuery only if it is really necessary. This make
authorJephte CLAIN <Jephte.Clain@univ-reunion.fr>
Tue, 19 Oct 2010 05:29:20 +0000 (09:29 +0400)
committerJephte CLAIN <Jephte.Clain@univ-reunion.fr>
Tue, 19 Oct 2010 05:32:13 +0000 (09:32 +0400)
jQuery.noConflict() callable anytime.

src/core.js

index 99521d91cd274065495a773823ce49cbba9a7062..f701a20c1fa56aa30aef4536d206ae4e67ed25ab 100644 (file)
@@ -373,9 +373,9 @@ jQuery.extend = jQuery.fn.extend = function() {
 
 jQuery.extend({
        noConflict: function( deep ) {
-               window.$ = _$;
+               if ( window.$ === jQuery ) window.$ = _$;
 
-               if ( deep ) {
+               if ( deep && window.jQuery === jQuery ) {
                        window.jQuery = _jQuery;
                }