开发者

How do you select the last visible element with jQuery?

开发者 https://www.devze.com 2023-01-08 00:26 出处:网络
I am using jQuery and I want to select the last visible element with some class e.g. \'target\' how can I开发者_StackOverflow社区 do that ?Sorry but I didn\'t realize that it was this easy..

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

how can I开发者_StackOverflow社区 do that ?


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

I found the answer after googling it

$('.target:visible:last');


var e = jQuery('.target:visible:last');
0

精彩评论

暂无评论...
验证码 换一张
取 消