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.
If you want animations the easiest way is to modify the script so it adds and removes a class instead, and use CSS for the animations. I like that approach as it's modern progressive enhancement; if a slideshow doesn't support animation with CSS it get's a simple but functional show/hide "animation".
I thought I could use them nifty bitwise operators in some way but I've never been able to figure them out...