Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nobitagit/dotdot
A better mask for your HTML inputs. Add a dot every 3 integers in numeric form fields.
https://github.com/nobitagit/dotdot
Last synced: about 1 month ago
JSON representation
A better mask for your HTML inputs. Add a dot every 3 integers in numeric form fields.
- Host: GitHub
- URL: https://github.com/nobitagit/dotdot
- Owner: nobitagit
- License: mit
- Created: 2014-11-14T07:39:58.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-29T20:28:36.000Z (about 9 years ago)
- Last Synced: 2024-11-10T06:29:28.610Z (about 2 months ago)
- Language: JavaScript
- Homepage: http://jsbin.com/yateme/2
- Size: 242 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
dotdot
======This script masks an input field by adding a dot every three digits starting from the last integer and allowing only numbers to be typed in.
You can use it with both vanilla JavaScript and jQuery, although jQuery is NOT required.
Simply pass your selector(s) like this:```javascript
var elems = document.getElementsByTagName('input')
Dotdot(elems);// or...
var elems = $('#myElem');
Dotdot(elems);```
Get it with npm:
```js
npm i dotdot-mask
```Look in the `demo/` folder for an example or check this [bin](http://jsbin.com/yateme/2).