Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Made it so that you no longer need to build jQuery in order to run th…
…e test suite (but you'll still need a checkout of QUnit and Sizzle, at least).
- Loading branch information
Showing
14 changed files
with
141 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
(function() { | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
// Define a local copy of jQuery | ||
var jQuery = function( selector, context ) { | ||
// The jQuery object is actually just the init constructor 'enhanced' | ||
@@ -11,7 +13,7 @@ var jQuery = function( selector, context ) { | ||
_$ = window.$, | ||
|
||
// Use the correct document accordingly with window argument (sandbox) | ||
document = window.document, | ||
//document = window.document, | ||
This comment has been minimized.
Sorry, something went wrong.
jos3000
|
||
|
||
// A central reference to the root jQuery(document) | ||
rootjQuery, | ||
@@ -699,6 +701,39 @@ jQuery.extend({ | ||
return proxy; | ||
}, | ||
|
||
// Mutifunctional method to get and set values to a collection | ||
// The value/s can be optionally by executed if its a function | ||
This comment has been minimized.
Sorry, something went wrong.
davidmurdoch
|
||
access: function( elems, key, value, exec, fn, pass ) { | ||
var length = elems.length; | ||
|
||
// Setting many attributes | ||
if ( typeof key === "object" ) { | ||
for ( var k in key ) { | ||
jQuery.access( elems, k, key[k], exec, fn, value ); | ||
} | ||
return elems; | ||
} | ||
|
||
// Setting one attribute | ||
if ( value !== undefined ) { | ||
// Optionally, function values get executed if exec is true | ||
exec = !pass && exec && jQuery.isFunction(value); | ||
|
||
for ( var i = 0; i < length; i++ ) { | ||
fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); | ||
} | ||
|
||
return elems; | ||
} | ||
|
||
// Getting an attribute | ||
return length ? fn( elems[0], key ) : undefined; | ||
}, | ||
|
||
now: function() { | ||
return (new Date()).getTime(); | ||
}, | ||
|
||
// Use of jQuery.browser is frowned upon. | ||
// More details: http://docs.jquery.com/Utilities/jQuery.browser | ||
uaMatch: function( ua ) { | ||
@@ -779,51 +814,7 @@ function doScrollCheck() { | ||
jQuery.ready(); | ||
} | ||
|
||
function evalScript( i, elem ) { | ||
if ( elem.src ) { | ||
jQuery.ajax({ | ||
url: elem.src, | ||
async: false, | ||
dataType: "script" | ||
}); | ||
} else { | ||
jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); | ||
} | ||
|
||
if ( elem.parentNode ) { | ||
elem.parentNode.removeChild( elem ); | ||
} | ||
} | ||
|
||
// Mutifunctional method to get and set values to a collection | ||
// The value/s can be optionally by executed if its a function | ||
function access( elems, key, value, exec, fn, pass ) { | ||
var length = elems.length; | ||
|
||
// Setting many attributes | ||
if ( typeof key === "object" ) { | ||
for ( var k in key ) { | ||
access( elems, k, key[k], exec, fn, value ); | ||
} | ||
return elems; | ||
} | ||
|
||
// Setting one attribute | ||
if ( value !== undefined ) { | ||
// Optionally, function values get executed if exec is true | ||
exec = !pass && exec && jQuery.isFunction(value); | ||
|
||
for ( var i = 0; i < length; i++ ) { | ||
fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); | ||
} | ||
|
||
return elems; | ||
} | ||
|
||
// Getting an attribute | ||
return length ? fn( elems[0], key ) : undefined; | ||
} | ||
// Expose jQuery to the global object | ||
window.jQuery = window.$ = jQuery; | ||
|
||
function now() { | ||
return (new Date()).getTime(); | ||
} | ||
})(); | ||
This comment has been minimized.
Sorry, something went wrong.
rwaldron
Member
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
// Expose jQuery to the global object | ||
window.jQuery = window.$ = jQuery; | ||
|
||
})(window); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This breaks jQuery.noConflict()
Test case: http://jsbin.com/ujije4/9
Note the closing " })(); " below.