hi, am working on a php site, i need a functionality where titles of last four posts would show up, i know how to get last four titles. but dont know how to make them blink one by one on same place,like i have four titles name A B C D, first [A] then A should disappear and B will take place of A i.e. . hope i made myself clear, please help if anybody know how to do it?
its like text flashing up in rss feed, your last 5 or 6 posts show up one by one.
Sahilsahni
0
Light Poster
Recommended Answers
Jump to PostSomething like this?
(function() { var current = 0; var textElems = document.getElementById('container').getElementsByTagName('div'); setInterval(function() { current = current < 3 ? current + 1 : 0; for(var i in textElems) textElems[i].style.display = i == current ? 'block' : 'none'; }, 500); })();
Not tested, perhaps I forgot …
Jump to PostErm, perhaps try the code I posted? You can also replace div with img on line 3.
All 5 Replies
twiss
155
Veteran Poster
Sahilsahni
0
Light Poster
Sahilsahni
0
Light Poster
twiss
155
Veteran Poster
matricol
-8
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.