Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@blivesta
Last active August 5, 2016 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blivesta/5314944693cb8c1756c105b2b9b337e1 to your computer and use it in GitHub Desktop.
Save blivesta/5314944693cb8c1756c105b2b9b337e1 to your computer and use it in GitHub Desktop.
Chaffle mouseover
// 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