I've got a JS script I found at http://css-tricks.com/multi-product-quantity-based-order-form/
Once I've implemented it, the multiplication is incorrect. Here is the page I'm working on: http://www.trueliteinc.com/index.php/carrabbas-order-form/
If you put "15" as the quantity for the second item down, the total is $38.8499999 instead of $38.85. Why? How can I fix this problem?
This is the function I believe is doing the multiplying:
function calcTotalPallets() {
var totalPallets = 0;
$(".num-pallets-input").each(function() {
var thisValue = parseFloat($(this).val());
if ( (IsNumeric(thisValue)) && (thisValue != '') ) {
totalPallets += parseInt(thisValue);
};
});
$("#total-pallets-input").val(totalPallets).toFixed(2);
}
My entire code can be found at http://jsfiddle.net/2aFCs/3/
Thanks so much in advance