Jquery - Get the latest element in a div
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();
精彩评论