X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=44eedf2525c80d8a0205f06c3b16396d5f36c000;hb=cb0fbbbac1ccad88fe548d9e1fe2b8d791098eb0;hp=430e24f8eb08c113946d96c3c14894d1f12beff5;hpb=e07bfbef2d12e03d81f88c99275a63698b643bcc;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 430e24f..44eedf2 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -1472,7 +1472,7 @@ jQuery.extend({ if ( p == "height" || p == "width" ) { var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"]; - for ( var i in d ) { + for ( var i=0; i|/", "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) : []; } ], @@ -2245,8 +2241,8 @@ jQuery.extend({ }, trigger: function(type,data,element) { - // Touch up the incoming data - data = data || []; + // Clone the incoming data, if any + data = $.merge([], data || []); // Handle a global trigger if ( !element ) { @@ -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