I have a part in a website that I need to show as a news ticker.
It looks like this:
<div class="news">
<span>NEWS 1</span>
<span>NEWS 2</span>
<span>NEWS 3</span>
</div>
I need a javascript code to show news repeatedly without using plugins. The idea is to show a span and hide the rest of spans and repeat with order each n seconds.
How can I do that ?
How about something like this (obviously changing the interval to suit your needs, it’s in milliseconds):
Here’s a working demo > http://jsfiddle.net/J35Sa/