tags:

views:

24

answers:

1

I have 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?

+4  A: 

Last one:

 $("span .breadcrumb:last") 

Second one:

 $("span .breadcrumb:eq(1)") 
Philippe Leybaert