This is a simple content display ticker. We can use it for news/quote/testimonial ticker display. Last week I wanted to give a quote ticker in a website. As usual I was looking for Query News Ticker and gone through some. Finally I have decided to make a simple own script, tried and it works fine.
HTML – Understanding the Layout
Decide a box to display content and give an id, say id=”ticker”
JS – Add Jquery core and a simple ticker script
Add the Jquery core as usual. Then the script is simple.
Step 1: Set the content array (It can be HTML)
Step 2: Call the recurring function
Step 3: In the recurring function change the content of the div in some time interval
Step 4: Don’t forget to reset i value at end of the array
After some modification, the code looks like…