1.0.0 • Published 5 years ago

vanilla-fade-io v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

vanilla-fade-io

fadeIn() and fadeOut() without jQuery, in pure JavaScript

Installation

Regular

Clone this repository or download it

or NPM

npm install git+https://github.com/turkelton31/vanilla-fade-io.git --save

Usage

document.getElementById('in').addEventListener('click', function() {
    FX.fadeIn(document.getElementById('test'), {
        duration: 2000,
        complete: function() {
            alert('Complete');
        }
    });
}, false);

document.getElementById('out').addEventListener('click', function() {
    FX.fadeOut(document.getElementById('test'), {
        duration: 2000,
        complete: function() {
            alert('Complete');
        }
    });
}, false);

Exemple

CodePen