https://github.com/sofish/mask.js
create an opacity mask to a(all) specific element(s)
https://github.com/sofish/mask.js
Last synced: about 1 month ago
JSON representation
create an opacity mask to a(all) specific element(s)
- Host: GitHub
- URL: https://github.com/sofish/mask.js
- Owner: sofish
- Created: 2013-02-02T08:15:20.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2014-10-30T09:22:32.000Z (over 11 years ago)
- Last Synced: 2025-03-04T21:02:18.355Z (over 1 year ago)
- Language: JavaScript
- Size: 138 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Mask.js
Mask.js makes it easy to add a opacity layer to DOM Element. Especially for the annoying IE bug.
## Usage:
a `Mask` object will be automatically created and attached to `window`. It has 3 Public APIs:
```js
// debug: once the `debug` method is called, the layer's value
// of opacity will set to 0.6
// NOTE: make sure the method is called before `set`
Mask.debug()
// create mask for dom element(s)
Mask.set(element1, element2, ... elementN);
// remove the mask over the dom element(s)
Mask.remove(element1, element2, ... elementN);
```
## License:
Licensed under MIT. (c) Sofish Lin