fadeIn() and fadeOut() without jQuery, in pure JavaScript
Clone this repository or download it
npm install git+https://github.com/turkelton31/vanilla-fade-io.git --save
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);