trying to test of checkbox is checked
from my form:
<div class="field" id="free_shipping">
<input type="checkbox" name="free_shipping" id="free_shipping">Free shipping
</div>
from my js:
$('#free_shipping').change(function(e)
{
if ($('#free_shipping').prop('checked'))
{
$("#shipping_cost").hide();
}
else
{
$("#shipping_cost").show();
}
})