SyntaxFix
Write A Post
Hire A Developer
Questions
An even simpler solution would be this (IF you are targeting ALL number inputs in a particular form):
//limit number input decimal places to two $(':input[type="number"]').change(function(){ this.value = parseFloat(this.value).toFixed(2); });