I have a textbox which is set up to convert a number into currencies using the following line:
$("#price").live('keydown', currenciesOnly).live('blur', function () { $(this).formatCurrency(); });
In order for the textbox to convert 81 to $81.00 the following needs to happen:
- The HTML field before the textbox has to send the focus to the currency textbox
- Then the currency textbox has to lose focus to another field.
How can I make it so the currency textbox converts to currency as soon as it has a value instead of losing focus?
live()you are running fairly old version of jQuery so check compatibility with your version