blink-element
v1.0.1
Published
For those times you wanna make a element blink using JS
Downloads
7
Maintainers
Readme
About
A small module to make a DOM element blink using JS.
Install
Install with cdn
<link rel="stylesheet" href="https://unpkg.com/blink-element/lib/blink.js">
<!-- Or -->
<link rel="stylesheet" href="https://cdn.rawgit.com/tiaanduplessis/blink-element/master/lib/blink.js">Install with npm
$ npm install --save blink-elementInstall with yarn
$ yarn add blink-elementUsage
Add the blink.js or blink.min.js script to your project. You can then use it by calling the blink function.
// var blink = require('blink-element') || import blink from 'blink-element'
var elem = document.querySelector('.element-in-need-of-blink')
blink({
element: elem, // Element to add blinking effect
speed: 0.01 // Speed at which the opacity will change for fade in/out
})
API
The blink function takes a single object as its argument with element and speed as its properties.
See usage for an example of how to call the function.
Contribute
Contributions are welcome. Please open up an issue or create PR if you would like to help out.
Note: If editing the README, please conform to the standard-readme specification.
License
Licensed under the MIT License.
