I have:
TotalPrice = parseInt(TotalPrice*100)/100;
$('input[name=EstimatedPrice]').val(TotalPrice);
$('#EstimatedPriceDisplay').text(TotalPrice);
and I'm getting two warnings from lint.
val() called incorrectly
text() called incorrectly.
I was able to eliminate the text() called incorrectly error by doing the following:
$('#EstimatedPriceDisplay').text('' + TotalPrice);
But that seems kinda kludgy to me.
Do you want to support IE <5.5? If not, try to use the
.toFixed()
method, which returns a string and rounded to the specified decimal place.