I have a div on my website which contains text.
<div class="bloc_thumb_produit">
<span class="price">
<span class="woocommerce-Price-amount amount">0,00
<span class="woocommerce-Price-currencySymbol">€</span>
</span>
</span>
</div>
I want to change the text "0,00" by "price on demand"
I can do it using this jQuery code :
$(".bloc_thumb_produit .price .amount:contains('0,00')").html("price on demand");
It works fine but only when text is "0,00", when text is "40,00", my text is also changed.
I'm trying to find a way to match exact text "0,00" and also delete spans around the text, to have this :
<div class="bloc_thumb_produit">
<span class="price">
<span class="woocommerce-Price-amount amount">price on demand</span>
</span>
</div>
Instead of this :
<div class="bloc_thumb_produit">
<span class="price">
<span class="woocommerce-Price-amount amount"> 0,00
<span class="woocommerce-Price-currencySymbol">€</span>
</span>
</span>
</div>