X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=40598076dff94fd44692e6e60a70c306cb78d59f;hb=41cc839a2dff6342aaba048eae36d66d2a25d288;hp=ee65edbb1f8dd857b43d55a4ec69b82cfbe16bee;hpb=ea283bd13130303271077a6ee8b14b7c79bd0ce4;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index ee65edb..4059807 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -1818,8 +1818,8 @@ new function() { jQuery.each({ parent: "a.parentNode", parents: "jQuery.parents(a)", - next: "jQuery.nth(a,1,'nextSibling')", - prev: "jQuery.nth(a,1,'previousSibling')", + next: "jQuery.nth(a,2,'nextSibling')", + prev: "jQuery.nth(a,2,'previousSibling')", siblings: "jQuery.sibling(a.parentNode.firstChild,a)", children: "jQuery.sibling(a.firstChild)" }, function(i,n){ @@ -1928,50 +1928,6 @@ jQuery.each({ */ /** - * Displays each of the set of matched elements if they are hidden. - * - * @example $("p").show() - * @before

Hello

- * @result [

Hello

] - * - * @name show - * @type jQuery - * @cat Effects - */ - -/** - * Hides each of the set of matched elements if they are shown. - * - * @example $("p").hide() - * @before

Hello

- * @result [

Hello

] - * - * var pass = true, div = $("div"); - * div.hide().each(function(){ - * if ( this.style.display != "none" ) pass = false; - * }); - * ok( pass, "Hide" ); - * - * @name hide - * @type jQuery - * @cat Effects - */ - -/** - * Toggles each of the set of matched elements. If they are shown, - * toggle makes them hidden. If they are hidden, toggle - * makes them shown. - * - * @example $("p").toggle() - * @before

Hello

Hello Again

- * @result [

Hello

,

Hello Again

] - * - * @name toggle - * @type jQuery - * @cat Effects - */ - -/** * Adds the specified class to each of the set of matched elements. * * @example $("p").addClass("selected") @@ -2054,20 +2010,6 @@ jQuery.each( { jQuery.attr( this, key, "" ); this.removeAttribute( key ); }, - show: function(){ - this.style.display = this.oldblock ? this.oldblock : ""; - if ( jQuery.css(this,"display") == "none" ) - this.style.display = "block"; - }, - hide: function(){ - this.oldblock = this.oldblock || jQuery.css(this,"display"); - if ( this.oldblock == "none" ) - this.oldblock = "block"; - this.style.display = "none"; - }, - toggle: function(){ - jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ].apply( jQuery(this), arguments ); - }, addClass: function(c){ jQuery.className.add(this,c); },