Built with ❤︎ by Tiaan and contributors
A small module to make a DOM element blink using JS.
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-elementAdd 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
})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.
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.
Licensed under the MIT License.
