I'm trying to make a Div on the page Appear if a word exists later on the page? , what i'd actually like it to do is display if any words in a list of 10 appear on the page? The only place I want to look for them is inside of that TD class "sku nobr" after that span class "td-title"
I'm a total rookie at this, I got it to work for a H1 value with this code but I don't know how to do it with the 4523 where it is now??
THANKS!!!!!
<script type="text/javascript">
$(document).ready(function(){
if ($(".sku nobr:contains('4523')").length) {
$("#thingtohide").removeAttr("style").none();
}
});
</script>
<div id="thingtohide" style="display: none;">COOL TEXT TO DISPLAY</div>
<tr class="cart-item-row">
<td class="sku nobr">
<span class="td-title">SKU:</span>
4523
</td>
</tr>