Created
August 12, 2015 20:11
-
-
Save keeganbrown/b74981d14fa2bbcf0ef7 to your computer and use it in GitHub Desktop.
quick and dirty hammer scrolling for GSAP Timeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('body').hammer(); | |
$('body').on({ | |
'touchstart': function(e) { | |
e.preventDefault(); | |
}, | |
'pan': function(e) { | |
console.log(e); | |
if (e.gesture.deltaY > 2) { | |
master.reverse(); | |
} else if (e.gesture.deltaY < -2) { | |
master.play(); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment