Skip to content

Instantly share code, notes, and snippets.

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 fatihturan/3b2daec6f59b307fa49404cace5aa919 to your computer and use it in GitHub Desktop.
Save fatihturan/3b2daec6f59b307fa49404cace5aa919 to your computer and use it in GitHub Desktop.
if($('body').hasClass('page-about')) {
var controller = new ScrollMagic.Controller();
for(var i=0; i<6; i++) {
var teamPerson = $(".team__person").eq(i);
var tween = new TimelineMax()
.from(teamPerson, 1, {y: "20%", opacity: 0, ease:Strong.easeOut}, 1)
new ScrollMagic.Scene({
triggerHook: "onEnter",
triggerElement: '.team__person',
// reverse: false
})
.setTween(tween)
.addTo(controller);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment