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.
Unary operators (
~
,!
,+
... etc) have to be followed by an expression, and thus the function there becomes a function expression instead of function declaration. For example,(function(){})()
(expression) works whilefunction identifier(){}()
(declaration) makes an error.http://kangax.github.com/nfe/