[jQuery] Re: jQuery - Best way to get this ID from the DIV.

2009-07-21 Thread Richard D. Worth
var productID = $(this).closest('.item').attr('id'); See http://docs.jquery.com/Traversing/closest - Richard On Tue, Jul 21, 2009 at 2:27 PM, Glazz brunofgas...@live.com.pt wrote: Hi, I have this HTML: div id=1 class=item clearfix div class=image .../div div class=productx .../div

[jQuery] Re: jQuery - Best way to get this ID from the DIV.

2009-07-21 Thread Glazz
Thanks that worked :) Didn't know about that one hehe ;) Thanks again, Regards Bruno On 21 Jul, 20:14, Richard D. Worth rdwo...@gmail.com wrote: var productID = $(this).closest('.item').attr('id'); See http://docs.jquery.com/Traversing/closest - Richard On Tue, Jul 21, 2009 at 2:27