Hello i would like to hide a span and a div if the value is 0.00..here is my code
<span class="price-old"> <%=getCurrentAttribute('item','custitem_sumisho_listprice')%> </span>
<span class="price-new"><%=getCurrentAttribute('item','custitem_sumisho_onlineprice')%> </span>
<div class="save-sale" style="font-size: .8em; padding-top: 4em"><%=getCurrentAttribute('item','custitem_sumisho_totalsave')%></div>
In the above code if the div of class="save-sale" will have 0.00 value then i would like to hide the class="price-old" and class="save-sale".Here getattribute tag will get the value of item price.
I have tried the below jquery but its not working
<script type="text/javascript" src="/site/js/jquery-1.10.2.min.js"></script>
<script>
$(function () {
if ($(".save-sale").text() == "0.00") {
$(".save-sale").hide();
$(".price-old").hide();
}
});
</script>