I'm trying to translate an element as the user scrolls.
If possible, to class on scroll up and from a class on scroll down.
I think this is possible as the magic-wand does this on scroll down in this demo: http://janpaepke.github.io/ScrollMagic/
However, I can't figure out how to use this script ( https://github.com/janpaepke/ScrollMagic )
Here is my code to tell whether the user is scrolling up or down:
$(window).scroll(function(){
var scrollTop = $(this).scrollTop();
if(scrollTop>lScrollTop){
//scroll up
}
else{
//scroll down
}
lScrollTop = scrollTop;
});