On Dec 12, 2008, at 7:20 AM, Paul Mills wrote:
Guy, Ahhhh - I understand. I think you can make your code a bit simpler and not use the .each (function(). It depends on rest of the HTML whether it works or not. Something like this: $('tr.myclass').parents('table').parents('table').css("border", "4px black solid"); Rgds Paul
That's a nice improvement over the .each! It could probably be a bit simpler still by identifying the second table within the first .parents() filter:
$('tr.myclass').parents('table:eq(1)').css("border", "4px black solid"); --Karl ____________ Karl Swedberg www.englishrules.com www.learningjquery.com