X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=44eedf2525c80d8a0205f06c3b16396d5f36c000;hb=c119a80ea37a6940ec55dfb7b9f9b296800c7928;hp=9f6fbd0f70f04c26af0961039fb51dec1f057960;hpb=fcc99cd0f5464d8172405ad33b797e74d751b4c6;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 9f6fbd0..44eedf2 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -1648,12 +1648,8 @@ jQuery.extend({ ">|/", "jQuery.sibling(a.firstChild)", "\\+", "jQuery.sibling(a).next", "~", function(a){ - var r = []; var s = jQuery.sibling(a); - if ( s.n > 0 ) - for ( var i = s.n; i < s.length; i++ ) - r.push( s[i] ); - return r; + return s.n >= 0 ? s.slice(s.n+1) : []; } ], @@ -3318,8 +3314,8 @@ jQuery.macros = { }, /** - * Adds the specified class if it is present, removes it if it is - * not present. + * Adds the specified class if it is not present, removes it if it is + * present. * * @example $("p").toggleClass("selected") * @before

Hello

Hello Again