I'm having a little trouble getting this to work correctly.
I have breadcrumbs with the following structure
<nav class="breadcrumb" >
<a href="http://example.com">Home</a>
">"
<a href="http://example.com/category/Mens/">Mens</a>
"> Mens Clothing"
</nav>
Which outputs to:
Home>Mens>Mens Clothing
I want:
Home>Mens>Clothing
And my code for replacing the last part of the breadcrumb:
$(".breadcrumb").text(function(){
return $(this).text().replace("Mens Clothing", "Clothing");
})
My problem is that my code removes the links and just leaves me with"
<nav class="breadcrumb" >
"Home>Mens>clothing"
</nav>
with no links.
Not sure why. Please help
"> Mens Clothing", why are you in first place setting it?