Fancy javascript intro in 55 lines of code
Tonight I was supposed to do some boring database related stuff, but instead I got some ideas about
playing with table cells, random access and opacity.
Result is quite interesting, and it shows true power of Javascript. I suppose it would take lot more trouble to do something similar in flash, and if even if it could be done, this method gives you lot more control.
(For example you can add specific onmouse effects/events on some table cells
)
So, here it is, 55 linse of javascript, no framework used:
Demo:
http://dragan.yourtree.org/projects/javascript-intro/
UPDATE
and now something even more crazy than our last example:
really nice mouse effect in just 18 lines.
(using prototype though
)
Demo:
http://dragan.yourtree.org/projects/js-mouse-grid/
I'm starting to wonder, is it possible to make, lets say 400x400 "display" made from 1x1 table cells and make an javascript demo, like they did in the 90's...
You know, plasmas, rotating cubes, etc..
Viewed 37799 times by 12015 viewers





on June 8th, 2008 at 4:03 pm
the second example doesn't work in IE7
on June 8th, 2008 at 5:55 pm
Thanks Luka, i've forgot el.style.filter='alpha(opacity = '+op+')'; for IE
now it works, but is still 5-10 timer slower than in FF or Safari
seams that IE cant handle that much cells (?)
on June 13th, 2008 at 10:53 pm
Both demos doesn't works on FF.
on June 14th, 2008 at 1:27 am
It does work in FF.
What version of FF are you using and on what OS?
And is the Javascript turned On?