0

I want to be able to move the user between div elements depending on if the user scrolled up or down (to see the effect, checkout )

My initial code is;

var lastScrollTop = 0;
$(window).scroll(function(event){
    var st = $(this).scrollTop();
    if (st > lastScrollTop){
        $('html, body').animate({ scrollTop: 1000 }, 'slow');
        return false;
    } else {
        $('html, body').animate({ scrollTop: 0 }, 'slow');
        return false;
    }
    lastScrollTop = st;
    return false;
});

I have yet to put in the code to move to next sequential DIV, but the problem I have is once the scroll up or down has been triggered I can't escape it to capture the next scroll event.

Any help with breaking out of the event would be appreciated.

0 Answers0