To make a long story short, I am setting up a simplecart(JS) and for multiple options I am using checkboxes. Everything works fine calculating the different options in the cart, exept I need to print the text "VAT 21% €90" or "World (Taxfree)" (depending on what has been checked) in #tax div. How can I do this?
<script type="text/javascript">
simpleCart.tax = function(){
if( $("#regionSelect").val() == "VAT 21% €90" ){return 90;}
if( $("#regionSelect").val() == "World (Taxfree)" ){return 0;}
};
</script>
<input type="checkbox" name="tax" id="regionSelect" class="item_tax" value="eu" onClick="">Eu VAT 21%
<input type="checkbox" name="tax" id="regionSelect" class="item_tax" value="world"onClick="">World (Tax Free)
</dd>
<div id="tax"></div
UPDATE
Where exactly do I add this?
This only works for the later one.
if( $("#regionSelect").val() == "eu" ){return 90;} $("#tax").html("VAT 21% €90")
if( $("#regionSelect").val() == "world" ){return 0;} $("#tax").html("World (Taxfree)")
htmlfunctions inside your if statements.