Return control of $ and jQuery only if it is really necessary. This make

jQuery.noConflict() callable anytime.
This commit is contained in:
Jephte CLAIN 2010-10-19 09:29:20 +04:00
parent 008e971943
commit 689d63f487

View 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;
}