I want to trigger an animation if the user reaches a certain scroll position (or if he is certain pixels from the end of the page)
Therefore i used this code: https://jsfiddle.net/rt1LsofL/
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll >= 100) {
$(".ober-inner").addClass("animate");
}
});
It seems the class isn't added to the element and so the animation is not triggered. I already tried to insert an alert at the end of the js code which is working.
Thanks for your help.