X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=115ee7f2d70274f81f43ae81829dde825fe089c3;hb=c0e4280282d03a449caaf87d5a6bfe151a874796;hp=63d795c0c81724ffa59beafae78d79765e9af5d2;hpb=48ec10044f011ccfe9bd232d629682b59cccbd97;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 63d795c..115ee7f 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -69,7 +69,7 @@ function jQuery(a,c) { } // Map over the $ in case of overwrite -if ( $ ) +if ( typeof $ != "undefined" ) jQuery._$ = $; // Map the jQuery namespace to the '$' one @@ -193,7 +193,15 @@ jQuery.fn = jQuery.prototype = { * argument representing the position of the element in the matched * set. * - * @example $("img").each(function(){ this.src = "test.jpg"; }); + * @example $("img").each(function(){ + * this.src = "test.jpg"; + * }); + * @before + * @result + * + * @example $("img").each(function(i){ + * alert( "Image #" + i + " is " + this ); + * }); * @before * @result * @@ -629,6 +637,7 @@ jQuery.fn = jQuery.prototype = { * @example $("p").not("#selected") * @before

Hello

Hello Again

* @result [

Hello

] + * @test cmpOK($("#main > p#ap > a").not("#google").length, "==", 2, ".not") * * @name not * @type jQuery @@ -666,7 +675,7 @@ jQuery.fn = jQuery.prototype = { * @name add * @type jQuery * @param Array els An array of Elements to add - * @cat jQuery + * @cat DOM/Traversing */ /** @@ -680,7 +689,7 @@ jQuery.fn = jQuery.prototype = { * @name add * @type jQuery * @param Element el An Element to add - * @cat jQuery + * @cat DOM/Traversing */ add: function(t) { return this.pushStack( jQuery.merge( this, t.constructor == String ? @@ -695,7 +704,7 @@ jQuery.fn = jQuery.prototype = { * @member jQuery * @param {String} expr The expression with which to filter * @type Boolean - * @cat jQuery + * @cat DOM/Traversing */ is: function(expr) { return expr ? jQuery.filter(expr,this).r.length > 0 : this.length > 0; @@ -2201,7 +2210,7 @@ jQuery.macros = { /** * Get a set of elements containing the unique ancestors of the matched - * set of elements. + * set of elements (except for the root element). * * @example $("span").ancestors() * @before

Hello

Hello Again
@@ -2229,7 +2238,7 @@ jQuery.macros = { /** * Get a set of elements containing the unique ancestors of the matched - * set of elements. + * set of elements (except for the root element). * * @example $("span").ancestors() * @before

Hello

Hello Again
@@ -2655,4 +2664,4 @@ jQuery.macros = { } }; -jQuery.init(); \ No newline at end of file +jQuery.init();