treehouse : what would you like to learn today?
Web Design Web Development iOS Development

How to make this scroll up or down

  • I'm using this news ticker feed that scrolls right to left. I'm trying to get it to scroll up instead. How can I achieve this?

    $(function() {
    $('#ticker-1').carouFredSel({
    width: 1000,
    align: false,
    items: {
    width: 'variable',
    height: 35,
    visible: 1
    },
    scroll: {
    delay: 1000,
    easing: 'linear',
    items: 1,
    duration: 0.07,
    pauseDuration: 0,
    pauseOnHover: 'immediate'
    }
    });

    $('#ticker-2').carouFredSel({
    width: 1000,
    align: false,
    circular: false,
    items: {
    width: 'variable',
    height: 35,
    visible: 2
    },
    scroll: {
    delay: 1000,
    easing: 'linear',
    items: 1,
    duration: 0.07,
    pauseDuration: 0,
    pauseOnHover: 'immediate'
    }
    });

    // set carousels to be 100% wide
    $('.caroufredsel_wrapper').css('width', '100%');

    // set a large width on the last DD so the ticker won't show the first item at the end
    $('#ticker-2 dd:last').width(2000);
    });
  • Try adding:
    direction: 'up' or direction: 'down' to your configuration.

    Src: http://caroufredsel.frebsite.nl/configuration.php