+1 vote
by
<span class="price"><span class="Price-amount amount">0.00&nbsp;<span class="Price-currencySymbol">€</span></span></span>
<info></info>

<span class="price"><span class="Price-amount amount">10.50&nbsp;<span class="Price-currencySymbol">€</span></span></span>
<info></info>
$('.Price-amount').each(function() {
if ($(this).text('0.00')) {
$(this).replaceWith('<div class="info"><img src="/icons8-informaciya-24.png"><div class="info-text">Узнать цену - "какой-то текст"</div></div>');
}
});
https://jsfiddle.net/bfza30mL/

1 Answer

0 votes
by
 
Best answer
$('.Price-amount').each(function(index, el) {
if ($(el).text().includes('0.00')) {
$(el).replaceWith('<div class="info"><img src="/icons8-informaciya-24.png"><div class="info-text">Узнать цену - "какой-то текст"</div></div>');
}
});
...