I have elements like this
<div id="screen">
<div class="post">Post1......etc</div>
<div class="post">Post2......etc</div>
<div class="post">Post3......etc</div>
<div class="post">Post4......etc</div>
<div class="post">Post5......etc</div>
<div class="post">Post6......etc</div>
<div class="post">Post7......etc</div>
<div class="post">Post8......etc</div>
<div class="post">Post9......etc</div>
<div class="post">Post10.....etc</div>
</div>
But in screen box, size is limited to show only 5 elements. So at first Post1 to Post5 will be displayed. Rest is overflow hidden. At a interval of 2 seconds next element should show by scrolling up. That is after 2 seconds this contents of screen will scroll up 1 item. Now it will show Post2 to Post6. And this continues every 2 seconds like a loop. After Post10, Post1 should show up then Post2 and so.
I donot know how to do this. I read documentation of jQuery cycle: http://jquery.malsup.com/cycle/
But i didnot how to do this. This effect is like a news scroller.
Please help
jCarousel is a nifty plugin for displaying tickers! But you’ll need a bit of skinning to get it displayed as per your requirements.
To use jCarousel to get your scroller running, you’ll have to make a little modification on your current HTML structure.
I have replaced the DIV type structure with an unordered list.
To run this plugin at its very basic, you’ll need to add the jCarousel script and a CSS theme to your page (I’ve used jCarousel’s Tango theme).
Here’s how you use the plugin:
You will need to modify the CSS for the plugin to display it as per your need though.
Here’s a fiddle I created using jCarousel: http://jsfiddle.net/kayen/VFdL8/