Possible Duplicate:
"Flashing" random text with javascript
I can’t figure out how to make this maybe stupid thing.
I have several text phrases that I have to switch between and loop with fading transition.
How can I build this stuff in jQUery?
Thanks in advance.
HTML —
CSS —
JavaScript —
This uses an interval to loop through the
<p>tags within a container<div>. The<p>tags are set to the same location so the fade in/out will appear on top of each other. On document load the number of<p>tags are found and stored in a global variable. The function that runs in the interval hides all the<p>tags within the containing<div>and then shows the next one in line.Here is a jsfiddle of the above code: http://jsfiddle.net/Z8s7d/