Skip to content

Instantly share code, notes, and snippets.

@UbaldoRosas
Created July 24, 2019 17:58
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 UbaldoRosas/afdc2d0dd1b03f8d50268d5a04ffdfbf to your computer and use it in GitHub Desktop.
Save UbaldoRosas/afdc2d0dd1b03f8d50268d5a04ffdfbf to your computer and use it in GitHub Desktop.
SM = {
controller : new ScrollMagic.Controller(),
elems : {
animatedElement : $('#animated-element')
}
}
cleanSM : function() {
SM.controller = SM.controller.destroy(true);
for (const elem in SM.elems) {
if (SM.elems.hasOwnProperty(elem)) {
const $element = SM.elems[elem];
$element.removeAttr('style');
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment