Today I wrote a new image rollover script to replace my old one that I’ve been using for a few years. The old script was about 60 lines of code and when I ran it through the profiler in FireBug it was always one of the more heavy scripts on the page. This new script is 29 lines of code and runs about 500x faster. Here’s the code (jQuery required): 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20