I dont know why you would resort to such a laggy script, this is 40 more bytes but much more efficient, the one you provided gets exponentially worse with longer arrays
I have another revision of the rainbow script. It 's a String prototype function that creates DOM nodes (a containing span that contains one span per letter in the string). The reason for the containing span is so that another function can be called. This second function "moves" the rainbow by recoloring it with a different starting hue value.
I'm sure it's less efficient than some of the other rainbow stuff we've made, but it moves! Ooh!
Last edited by HaganeNoKokoro; 06-18-2005 at 02:45 AM.
Kids, kids... you tried your best, and you failed miserably; the lesson is: never try.
LOL,
I knew this was gonna happen sooner or later...
That RainbowSpan function is a nice function and deserves a proper place. With all due respect, post it here: Function Library
I'd add your RainbowSpan function to my index page, but it isn't a prototype function.
You guys have been watching my first post of this thread, right?
Yeah, I know it isn't really a prototype-function, I just figured I could get a rise out of you with that comment. I'll post the latest version in your other thread.
Kids, kids... you tried your best, and you failed miserably; the lesson is: never try.
3.3333333333 Can be written as: 33333333333 / 1000000000
The only problem is that you need to make JavaScript understand that 3.3333333333 means 3.33... repeating.
Thus 33333333333 / 1000000000 means 10/3
Hmm....
I'll have a clear head tomorrow...
Bookmarks