Reputation: 240
The CMS I'm using inserts code for a breadcrumb navigation on my pages, and I don't have the ability to edit it directly. Right now the breadcrumb looks like:
www.mysite.com » Home » About Us
I want to remove the "www.mysite.com" and the first »
How do I do that with JQuery? The HTML code looks like:
<span class="breadcrumbComponent">
<a class="breadcrumb" href="/">www.mysite.com</a> <span class="breadcrumbseparator">»</span> <a class="breadcrumb" href="/en/">Home</a> <span class="breadcrumbseparator">»</span> <a class="breadcrumb" href="/en/about-us/">About Us</a>
</span>
So basically I just need to remove:
<a class="breadcrumb" href="/">www.mysite.com</a> <span class="breadcrumbseparator">»</span>
Upvotes: 1
Views: 773
Reputation: 26699
$('.breadcrumb:first').remove();
$('.breadcrumbseparator:first').remove();
Upvotes: 2