I've got some JS:
var updateAmount = function (amount, rate) {
if (rate > 0 && amount.length > 0 && !isNaN(amount) && amount > 0) {
amount = Math.round(rate * amount * 100) / 100; // multiply rate with amount and then round to 2 decimals
$('.you-get').show();
$('#you-get').text(amount + ' ' + $currencyTo.find(':selected').text());
} else {
$('.you-get').hide();
}
};
What I need is a clause that checks if the value generated from amount + $currencyTo.find
is a whole number, if it is then add .00
to the end of it.