mirror of
https://github.com/jquery/jquery.git
synced 2026-02-05 14:05:17 -05:00
Fixed bug #147, required some (ugly) modifications: changed function jQuery(...){} to jQuery = function(...){}, necessary because IE parses all function name(){} declarations before executing inline code; added intro.js and outro.js to both build.xml (tested) and Makefile (not tested) to include "if(typeof window.jQuery == "undefined") { ... }
This commit is contained in:
2
src/intro.js
Normal file
2
src/intro.js
Normal file
@@ -0,0 +1,2 @@
|
||||
/* prevent execution of jQuery if included more then once */
|
||||
if(typeof window.jQuery == "undefined") {
|
||||
4
src/jquery/jquery.js
vendored
4
src/jquery/jquery.js
vendored
@@ -28,7 +28,7 @@ window.undefined = window.undefined;
|
||||
* @name jQuery
|
||||
* @cat Core
|
||||
*/
|
||||
function jQuery(a,c) {
|
||||
jQuery = function(a,c) {
|
||||
|
||||
// Shortcut for document ready (because $(document).each() is silly)
|
||||
if ( a && a.constructor == Function && jQuery.fn.ready )
|
||||
@@ -67,7 +67,7 @@ function jQuery(a,c) {
|
||||
// If so, execute it in context
|
||||
if ( fn && fn.constructor == Function )
|
||||
this.each(fn);
|
||||
}
|
||||
};
|
||||
|
||||
// Map over the $ in case of overwrite
|
||||
if ( typeof $ != "undefined" )
|
||||
|
||||
1
src/outro.js
Normal file
1
src/outro.js
Normal file
@@ -0,0 +1 @@
|
||||
} // close: if(typeof window.jQuery == "undefined") {
|
||||
Reference in New Issue
Block a user