开发者

Jquery - Get the latest element in a div

somethings somethings somethings somethings somethings

How can select (with jquery) the latest element of t开发者_运维技巧his div with classname trackon? (in this case, the #trackline1) cheers


var latest = $('.tlcontent div:last');
latest.css({color:'red'});

demo


$('.tlcontent').children().last()

If you just what the last thing in content, try:

$('.content :last')

Example: http://jsfiddle.net/Kgp2u/


$(".tlcontent div").last();

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜