I'm piggy backing off of a previous post that talks specifically about removing a string from inside an element. The code to do that is:
$this.text( $this.text().replace("text to strip out", "") );
I've successfully stripped out the text "categories: "
FYI: This is a blog page with categories that are dynamically added. HTML structure before I strip out "categories: ":
<container>
<div class="categories">
"categories: " //This is what I strip out with above code
<a href = "...">Category Name</a> //This is a linked category name
</div>
</container>
The problem is that when I remove "categories: " it is also stripping out the and leaving me with an unlinked "Category Name"
After the jquery runs html looks like this:
<container>
<div class="categories">Category Name</div>
</container>
I need to keep the link active, as I want the ability for the user to click "Category Name" to stay.