A tweet-sized slideshow and DOM show/hide iteration utility.
- Shows/Hides a collection of DOM-elements with a certain interval
- Interval delay can be set in ms
- Index where the slideshow should start can be set
See examples below in test.html. The example uses JS 1.6 filter function, so don't expect it to run in IE<9.
IMPORTANT NOTICE: you shouldn't actually use this god-awful (wonderfully geeky rainbow) piece of crap code. Always prefer JSlinted, well formed and secure code over unstable, hard-to-read error-prone ninja code.
Save some bytes - not sure if it works correctly.
function(a,b,c){c|=function f(d,e){for(e=d=a.length;d--;)a[d].style.display=d^c%e?'none':'';c++;setTimeout(f,b)}()}