Get last occurance in a <DIV>
I ha开发者_运维知识库ve the following JQUERY:
$(function() {
$('span .breadcrumb').each(function(){
$('#footer').addClass($(this).text());
});
});
So it reads the .breadcrumb and adds the text contained with text to #footer.
However .breadcrumb occurs a number of time with in the breadcrumb navigation, I want it to read just the second value with the class .breadcrumb - Possible?
Last one:
$("span .breadcrumb:last")
Second one:
$("span .breadcrumb:eq(1)")
精彩评论