set value toFixed on blur
I have an input field that is used to insert a dollar amount. If the user types in "100" or "100." I want to add two decimal places to the value using the toFixed(2) method.
This is what I'm trying, but it is undefined.
-
var j$ = jQuery.noConflict();
j$(document).ready(function(){
var ccAmt = j$('[id$=Credit_Amount]').blur(function() {
ccAmt.text( value.toFixed(2) );
});
});
Thanks for any help.