Customizing the Scroll of a 'div'

3

Since there are many different device resolutions, I'm having a hard time displaying a feed list. Here is an image of how I think it best to display such DIV (list), since the page is responsive and it is not trivial to put a scroll-bar on a mobile device.

Image Correction: Buttom Scroll **

    
asked by anonymous 26.02.2014 / 13:07

2 answers

4

Here's a hand-drawn example:

$('div.img img').on('click', function () {
    var scrollDIV = $('#scrollDIV');
    var scrollAtual = scrollDIV.scrollTop();
    var novoScroll = scrollAtual + ($(this).hasClass('up') ? -200 : 200);
        scrollDIV.animate({
            scrollTop: novoScroll + 'px'
        }, 1500);
});

Example

    
26.02.2014 / 14:00
2

The ideal is that you make use of some library, developing some would not be so complicated, however, there are already countless available in the market.

My tip for you would be to use the vertical jquery carousel

    
26.02.2014 / 13:36