https://github.com/gobwas/jquery-megamask
Simple mask plugin for jquery.
https://github.com/gobwas/jquery-megamask
Last synced: about 1 month ago
JSON representation
Simple mask plugin for jquery.
- Host: GitHub
- URL: https://github.com/gobwas/jquery-megamask
- Owner: gobwas
- Created: 2013-03-02T18:50:39.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-10-29T11:20:45.000Z (over 10 years ago)
- Last Synced: 2025-01-24T09:42:27.986Z (3 months ago)
- Language: JavaScript
- Size: 178 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# [jquery](http://jquery.com)-megamask
> Create input masks.
Plugin that creates masks for your inputs.
## Getting started
Install with [npm](https://npmjs.org/package/jquery-megamask);
Or get the source from src folder.
** bower, and jquery packages will come somewhen **
## Overview
```javascript
// initialize plugin
$("#my_input").megamask('xxx.999-99-*');// some time ago
// when we need to get a raw (without mask symbols) value of input
$("#my_input").megamask("getRaw");// another way
// when we get a default value some time ago
// (by default masks do this on initialization)
$("#my_input").val("abc123123").megamask("refresh");
```## Options
The signature of plugin calling is:
```
$element.megamask(String mask, Object [options])
```Where `mask` is a string, representing the mask. Currently available symbols:
Symbol | Definition
-------|-----------
9 | Any number value
x | Any character (a-z)
* | Any value