Added a fix for .noConflict(true) not reverting properly. Also added unit tests for noConflict.
This commit is contained in:
parent
5736e8d90d
commit
1ac9d6fbee
3 changed files with 26 additions and 4 deletions
|
@ -10,8 +10,8 @@
|
|||
*/
|
||||
|
||||
// Map over jQuery in case of overwrite
|
||||
if ( typeof jQuery != "undefined" )
|
||||
var _jQuery = jQuery;
|
||||
if ( window.jQuery )
|
||||
var _jQuery = window.jQuery;
|
||||
|
||||
var jQuery = window.jQuery = function( selector, context ) {
|
||||
// If the context is a namespace object, return a new object
|
||||
|
@ -21,8 +21,8 @@ var jQuery = window.jQuery = function( selector, context ) {
|
|||
};
|
||||
|
||||
// Map over the $ in case of overwrite
|
||||
if ( typeof $ != "undefined" )
|
||||
var _$ = $;
|
||||
if ( window.$ )
|
||||
var _$ = window.$;
|
||||
|
||||
// Map the jQuery namespace to the '$' one
|
||||
window.$ = jQuery;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue