With html:
<input id="my_checkbox" type="checkbox" />
<div id="my_total">0.00</div>
and jQuery script on domReady:
$(document).ready(function(){
$("#my_checkbox").change(function(){
if($(this).is(':checked')) {
$('#my_total').html('333.45');
} else {
$('#my_total').html('0.00');
};
}).trigger('change');
});
solved Is it possible to have a checkbox contain a function?