javascript - Show the price of a product in WooCommerce after a button is clicked by the customer -
javascript - Show the price of a product in WooCommerce after a button is clicked by the customer -
the client asked prices not visible each product on e-shop until client clicks on button. far jquery/javascript, solution this, seem more appropriate, wondering if there else missing (code wise, in php example) help out more.
i request post have tried before asking in in future!
though solution here
<div class="product-image"> <p class="prod-name">product name</p> <p class="prod-price" style="display:none" >$1000</p> <input type="button" class="show-price" value="show price"/> </div>
css
.product-image{ border:1px solid #ccc; width:100px; height:100px; background-color:#f6f6f6; } .prod-name,.prod-price{ font-size:12px; text-align:center; }
js
$('.show-price').click(function(){ $(this).hide(); $('.prod-price').show(); });
working fiddle here http://jsfiddle.net/raghuchandrasorab/njt1sfew/1/
javascript jquery woocommerce
Comments
Post a Comment