I know this question already have asked before and i also tried the answer and it almost worked for me but there is one issue which i can't able to sort i tried plenty of ways but all in wain. This is the div i want to hide
<div class="price-box" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">
<p class="price"><span class="special-price" style="display: none;">
<span class="amount">$43.50</span>
</span>
</p>
</div>
when this div is not empty
<div class="single_variation"><span class="price"><span class="amount">$43.50</span></span></div>
This is what i implement
jQuery(document).ready(function() {
if( jQuery('.single_variation').is(':empty') ){
alert('hi');
jQuery('.price-box').show();
}
});
and also
if($('.price').length){ $('.price-box').hide(); }
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire