Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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