On Nov 19, 3:02 am, "Hector Virgen" <[EMAIL PROTECTED]> wrote:
> I would use jQuery#parents() for this.
> $('#r2').parents('td').attr('rowspan', '1');
>
> In case you are using nested tables, you may want to limit it to the first
> parent td found:
>
> $('#r2').parents('td:eq(0)').attr('rowspan', '1');

If the onclick listener is on the A element, why use an ID to get a
reference to the element when you can use this?

  $(this).parents('td:eq(0)').attr('rowspan', '1');


If an ID must be used for some reason, why not use the ID of the TD?

  $('#rsp2').attr('rowspan', '1');


--
Rob

Reply via email to