X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fcore.js;h=4da1212c1491488a10548c476a7e03e61d78b50c;hb=9029dc02a234ad9699513f81acd1423f9c2c4e30;hp=9e1bfc67fbe0986a4eac88d43e23e81cd9f127f5;hpb=983548f8ebc3fcd1bb4600bc4b740cb8a5d4c48b;p=jquery.git diff --git a/src/core.js b/src/core.js index 9e1bfc6..4da1212 100644 --- a/src/core.js +++ b/src/core.js @@ -215,7 +215,7 @@ jQuery.fn = jQuery.prototype = { this.toArray() : // Return just the object - ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] ); + ( num < 0 ? this[ this.length + num ] : this[ num ] ); }, // Take an array of elements and push it onto the stack @@ -733,6 +733,7 @@ jQuery.extend({ } } + // Flatten any nested arrays return ret.concat.apply( [], ret ); }, @@ -885,6 +886,11 @@ function doScrollCheck() { jQuery.ready(); } +// Expose jQuery as an Asynchronous Module +if ( typeof define === "function" ) { + define( "jquery", [], function () { return jQuery; } ); +} + // Expose jQuery to the global object return (window.jQuery = window.$ = jQuery);