global.js 608 B

12345678910111213141516171819202122232425262728293031323334
  1. define( [
  2. "../core"
  3. ], function( jQuery, noGlobal ) {
  4. "use strict";
  5. var
  6. // Map over jQuery in case of overwrite
  7. _jQuery = window.jQuery,
  8. // Map over the $ in case of overwrite
  9. _$ = window.$;
  10. jQuery.noConflict = function( deep ) {
  11. if ( window.$ === jQuery ) {
  12. window.$ = _$;
  13. }
  14. if ( deep && window.jQuery === jQuery ) {
  15. window.jQuery = _jQuery;
  16. }
  17. return jQuery;
  18. };
  19. // Expose jQuery and $ identifiers, even in AMD
  20. // (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
  21. // and CommonJS for browser emulators (#13566)
  22. if ( !noGlobal ) {
  23. window.jQuery = window.$ = jQuery;
  24. }
  25. } );