[jQuery] Re: Select only the next row in a table

2007-06-27 Thread Massimiliano Marini
Great! It works! :) I've learned something new, thanks to Glen, Corey and Karl. -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/ "It's easier to invent the future than to predict it." -- Alan Kay

[jQuery] Re: Select only the next row in a table

2007-06-27 Thread Glen Lipka
$("tr").next("tr").show(); Would this do it? Glen On 6/27/07, Massimiliano Marini <[EMAIL PROTECTED]> wrote: Hi all, I've this table : View Next Row Cell with content Hello to the jQuery community ... ... ... I'm using this code to diplay the tr with hidden c

[jQuery] Re: Select only the next row in a table

2007-06-27 Thread Glen Lipka
I made a demo page. http://www.commadot.com/jquery/nextrow/ Click on a row and it shows the next row. My first syntax worked fine. $("table tr:odd").hide() $("td").click( function() { $(this).parents("tr").next("tr").show(); } ); Glen On 6/27/07, Glen Lipka <[EMAIL PROTECTED]> wrote:

[jQuery] Re: Select only the next row in a table

2007-06-27 Thread Karl Swedberg
On Jun 27, 2007, at 11:29 AM, Corey Frang wrote: Not really, that selector finds ALL "tr" then any "tr" after each of those. Assuming your calling it from something like this: $(".showNextRow).click(function() { $(this).parents("tr").next("tr.hidden").show(); return false; }); also ass

[jQuery] Re: Select only the next row in a table

2007-06-27 Thread Glen Lipka
What about $(this).parents("tr").next("tr.first").show(); On 6/27/07, Corey Frang <[EMAIL PROTECTED]> wrote: Not really, that selector finds ALL "tr" then any "tr" after each of those. Assuming your calling it from something like this: $(".showNextRow).click(function() { $(this).parents(

[jQuery] Re: Select only the next row in a table

2007-06-27 Thread Corey Frang
Not really, that selector finds ALL "tr" then any "tr" after each of those. Assuming your calling it from something like this: $(".showNextRow).click(function() { $(this).parents("tr").next("tr.hidden").show(); return false; }); also assuming that the t1 table isn't inside another table with