Yep, XPath will take you up the dom and down again but you'll still need to
use a method to get to the next row.
An advantage of Blair's example is that by using .parents() we do not have
to know how deep 'this' is within the TR. If the link is definately a child
of the TD then you could use something like:
$("../..", this).next().find("td:eq(" + $("..", this).index() + ")"
).doYourThing()
(There may be a more concise way to get the desired td!)
George
Glen Lipka wrote:
>
> Also there is xPath or a combo solution.
> Hmm, the site seems down. Anyway, click on the xPath link on the right
> when
> you look at the documentation. (not the API)
>
>
> On 9/29/06, Blair McKenzie <[EMAIL PROTECTED]> wrote:
>>
>> Here's a stab. Could probably be simplified.
>> $(this).parents("tr").next().find("td:eq(index of td)").doYourThing()
>>
>> On 9/20/06, John Malaby <[EMAIL PROTECTED]> wrote:
>> >
>> > Hi there,
>> > I am hoping one of you can help me in what seems a simple issue, but I
>> > have
>> > been on this most of the day now.
>> > I have a table with data in it, along with cell that has a link in it,
>> > the
>> > link should toggle another cell that is found further in the table.
>> I've
>> >
>> > tried many ways of referencing the td but with no success. I've tried
>> > with
>> > next(), siblings() next(".description") and no success.
>> >
>> > Can someone please point out how I would reference from a link that is
>> > inside a td to toggle another td that is in another row?
>> >
>> > thanks in advance
>> >
>> >
>> >
>> > _______________________________________________
>> > jQuery mailing list
>> > [email protected]
>> > http://jquery.com/discuss/
>> >
>>
>>
>> _______________________________________________
>> jQuery mailing list
>> [email protected]
>> http://jquery.com/discuss/
>>
>>
>>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
--
View this message in context:
http://www.nabble.com/next%28%29-tf2356342.html#a6566938
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/