Skip to content

trashify/blink-element

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✨ blink-element


Blink - For those times you wanna make a element blink using JS



Built with ❤︎ by Tiaan and contributors

Table of Contents

Table of Contents
  • about
  • Install
  • Usage
  • API
  • Contribute
  • License
  • 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-element

    Install with yarn

    $ yarn add blink-element

    Usage

    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.