https://github.com/smallhadroncollider/mavis
Mavis is a very simple jQuery plugin that takes an object of class/regex pairs. When applied to an `input` it will update the class when the regex value is matched.
https://github.com/smallhadroncollider/mavis
Last synced: 5 months ago
JSON representation
Mavis is a very simple jQuery plugin that takes an object of class/regex pairs. When applied to an `input` it will update the class when the regex value is matched.
- Host: GitHub
- URL: https://github.com/smallhadroncollider/mavis
- Owner: smallhadroncollider
- Created: 2013-07-01T11:11:27.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-07-05T09:22:55.000Z (about 13 years ago)
- Last Synced: 2025-10-14T01:11:28.862Z (9 months ago)
- Language: JavaScript
- Size: 113 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mavis
Mavis is a very simple jQuery plugin that takes an object of class/regex pairs. When applied to an `input` it will update the class when the regex value is matched.
## Installation
Mavis can be easily installed using [Bower](http://bower.io):
```bash
bower install jquery-mavis
```
It will be placed in `components/jquery-mavis`.
## Usage
```html
```
```javascript
$('.mavis').mavis({
'twitter': /twitter\.com/i,
'facebook': /facebook\.com/i,
'google': /google\.com/i
});
```
Now typing `twitter.com` into the `input` will add a `twitter` class to it.
## License
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2013 Small Hadron Collider
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.