Can anyone help me to find all the "/" and remove them with jQuery please? HTML below:
<ul id="list">
<li>a /</li>
<li>b /</li>
<li>c</li>
</ul>
Can anyone help me to find all the "/" and remove them with jQuery please? HTML below:
<ul id="list">
<li>a /</li>
<li>b /</li>
<li>c</li>
</ul>
Try using :contains() to find each item, and then looping through to remove the /:
$("li:contains('/')").each(function(){
$(this).text($(this).text().replace(' /',''));
});
You'll need to modify for variances, but based on the HTML shown this will do the trick.