You could just do

$(this).parent().parent().addClass("greenback");

That should work fine.

On 6/7/07, Josh Nathanson <[EMAIL PROTECTED]> wrote:


I am trying to select the first td element two levels up from the clicked
div element.

I have this, which works, but it's ugly.

$(this).parents("td:first").parents("td:first").attr("class","greenback");

Is there a cleaner way?

- Josh



Reply via email to