Last active
August 5, 2016 18:17
-
-
Save blivesta/5314944693cb8c1756c105b2b9b337e1 to your computer and use it in GitHub Desktop.
Chaffle mouseover
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example: mouseover | |
import Chaffle from 'chaffle' | |
const elements = document.querySelectorAll('[data-chaffle]'); | |
Array.prototype.forEach.call(elements, function (el) { | |
const chaffle = new Chaffle(el, { /* options */ }); | |
el.addEventListener('mouseover', function () { | |
chaffle.init(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment