I'm working a simple field where only accepts numbers, what I want is to add ".00" at the end of the value while I'm typing. ex. 1000.00.
the problem I cant achieve that format, after 1 digit it adds '.00' and cant type anymore.
I tried the answer here but didn't work.
here is my sample work
$(document).ready(function(){
$("input").keyup(function(){
var val = parseInt($(this).val());
$(this).val(val.toFixed(2));
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="text">
Hope you can help me.
Thanks.