Can someone please please enlighten me to as why my toFixed() isn't working?
$("#amount").blur(function() {
if ($('#amount').val() % 100 != 0) {
alert("must be a multiple of 100, please try again")
} else {
$('#fee').val(parseFloat($('#amount').val()) * .035).toFixed(2);
}
});
Try
$('#fee').val(parseFloat($('#amount').val() * .035).toFixed(2));
Rearranged the brackets
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With