Hello,
I am looking for a way to place an automatic . (dot) or , (comma) for every multiple of 3.
I only find the mask to do so but it requires the user to input the exact amount of numbers:
<script type="text/javascript">
$(function() {
$.mask.definitions['~'] = "[+-]";
$("#numbermask").mask("999,999,999",{completed:function(){alert("completed!");}});
$("input").blur(function() {
$("#info").html("Unmasked value: " + $(this).mask());
}).dblclick(function() {
$(this).unmask();
});
});
</script>
like the above code requires the user to enter (9 numbers) - I would like the user to be able to enter any number he wants and still automatically placing .(dot) for every multiple of 3.