JQuery calculation after elements are shown
I have a form that I'm doing a few simple calculations on. I can't get the
calculation to run after I unhide the elements. I have proven that the
calculations work outside this form but I'm trying to add it to a form
that uses other libraries. I just can't figure out what I need to do to
get the calculation to bind to the id's after they are shown. Here's a
link to the a partial form with just the needed inputs to keep it simple.
testform If you click on "Yes" the elements show that I'm working with.
Thanks for any guidance. Here's the calculation script that I made.
<script>
function pottopot() {
if ($('#item78_number_1').val()>0 && $('#item76_number_1').val()>0){
totalpotgals = parseInt($('#item76_number_1').val(),10)
* parseInt($('#item78_number_1').val(),10)
/ parseInt($('#item47_number_1').val(),10);
$('#item48_number_1').val(totalpotgals.toFixed(2));
}
}
</script>
No comments:
Post a Comment