Please review the Fiddle here
In the JS, I have some output for a number. This number is currently without a comma delimiter.
I would like to add a comma in the thousands place.
Here's my output snippet -
<input type="text" disabled="disabled" class="savings numbers" id="moneySaved">
Here's the JS that goes with that -
$("#moneySaved").val("$" +(resultNonNursing*402) + ( " in tuition costs")); //# of credits * cost per credit ($402)
I am trying to use the jQuery Number Formatter. I have this in the header -
$(document).ready(function() {
$(".numbers").each(function() {
$(this).format({format:"#,###", locale:"us"});
});
});
And I've added the numbers class to the html output -
<input type="text" disabled="disabled" class="savings numbers" id="moneySaved">
...but it is not working.
Can you provide some direction here?
1234and I'm trying to accomplish1,234, or123,456,789, and123.$('.numbers').format(...).