I\'m trying to create a breadcrumb system for my site using the following:
-
example http://jsfiddle.net/mPsez/3/
$('.items a').on('click', function() {
var $this = $(this),
$bc = $('');
$this.parents('li').each(function(n, li) {
var $a = $(li).children('a').clone();
$bc.prepend(' / ', $a);
});
$('.breadcrumb').html( $bc.prepend('Home') );
return false;
})
讨论(0)