Pages UI
Search…
Autonumeric
autoNumeric is a jQuery plugin that automatically formats currency and numbers as you type on form inputs.
Please refer to jQuery autoNumeric Documentation to learn about plugin options
Step one
Include the javascript file inside the <body>before core template script inclusions, if it's not there already.
1
<script src="assets/plugins/jquery-autonumeric/autoNumeric.js" type="text/javascript">
Copied!
Step two
Add the markup.
1
<input type="text" data-a-dec="." data-a-sep="," class="autonumeric form-control">
Copied!
Step three
Apply the plugin.
Make sure you place the following script below all the pre-requisites mentioned in the Step two above.
1
<script>
2
$(document).ready(function() {
3
$('.autonumeric').autoNumeric('init');
4
});
5
</script>
Copied!
Last modified 1yr ago
Copy link