views:

44

answers:

2

Hello,

I am using jQuery and I want to select the last visible element with some class e.g. 'target'

how can I do that ?

+3  A: 

Sorry but I didn't realize that it was this easy..

I found the answer after googling it

$('.target:visible:last');
dejavu
Jepp, always google before you ask a question ;)
Felix Kling
I'll try to do that next time :)
dejavu
+1  A: 
var e = jQuery('.target:visible:last');
Aaron Harun
Thanks for your efforts.
dejavu