Search code examples
jqueryimagescrollusinginfinite

JQuery infinite scroll using image


Im stuck with this problem.i have set infinite content in a page and i should view only minimum content in it.i have kept arrow down image on bottom and i should hide the other contents in it and when i click the arrow down i need to view the remaining contents using pixels


Solution

  • http://jsfiddle.net/11a00a4b/

    var minimumScroll = 50;
    
    function scrollDown() {
        var y = $(window).scrollTop(); //current y position on the page
        $("html, body").animate({
            scrollTop: y + minimumScroll
        }, 600);
    }
    
    $('#down').click(function () {
        scrollDown()
    })