mirror of
https://github.com/tenrok/maska.git
synced 2026-05-15 11:59:38 +03:00
Update docs about usage with vanilla js
This commit is contained in:
@@ -67,6 +67,20 @@ Just load script `maska.js` and init it, passing element(s) or `document.querySe
|
||||
var mask = Maska.create('.masked');
|
||||
```
|
||||
|
||||
Mask could be set as `data-mask` attribute on element:
|
||||
|
||||
``` html
|
||||
<input data-mask='##/##/####'>
|
||||
```
|
||||
|
||||
or can be set by `mask` option on initialization:
|
||||
|
||||
``` javascript
|
||||
var mask = Maska.create('.masked', {
|
||||
mask: '##/##/####'
|
||||
});
|
||||
```
|
||||
|
||||
You can pass custom tokens while initialization:
|
||||
|
||||
``` javascript
|
||||
|
||||
Reference in New Issue
Block a user