Skip to content

Instantly share code, notes, and snippets.

@MiquelAdell
Created February 4, 2016 11:05
Show Gist options
  • Save MiquelAdell/d5bda3ab64e9d97248a6 to your computer and use it in GitHub Desktop.
Save MiquelAdell/d5bda3ab64e9d97248a6 to your computer and use it in GitHub Desktop.
$.getScript('/app/themes/cordills/dist/scripts/animation.gsap.js', function() {
//// SCROLL MAGIC
var controller = new ScrollMagic.Controller({globalSceneOptions: {triggerHook: "onEnter", duration: "200%"}});
// build scenes
new ScrollMagic.Scene({triggerElement: "#parallax1"})
.setTween("#parallax1 > div", {y: "80%", ease: Linear.easeNone})
.addTo(controller);
new ScrollMagic.Scene({triggerElement: "#parallax2"})
.setTween("#parallax2 > div", {y: "80%", ease: Linear.easeNone})
.addTo(controller);
new ScrollMagic.Scene({triggerElement: "#parallax3"})
.setTween("#parallax3 > div", {y: "80%", ease: Linear.easeNone})
.addTo(controller);
new ScrollMagic.Scene({triggerElement: "#parallax4"})
.setTween("#parallax4 > div", {y: "80%", ease: Linear.easeNone})
.addTo(controller);
new ScrollMagic.Scene({triggerElement: "#parallax5"})
.setTween("#parallax5 > div", {y: "80%", ease: Linear.easeNone})
.addTo(controller);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment