Under the Hood

8th September 2009

I’ve made a few more “under the hood” changes recently – mostly geared towards speeding up the rollovers, which have been bothering me.  At first I was using Dreamweaver’s default Javascript for rollovers which, fyi, is ridiculously inefficient and makes your html a huge mess.  Second attempt was using a jquery plugin to define a “rollover” class for the links (cleaner but still slow).  And now, finally, I have come around to using sprites for the navigation.  Sprites work by simply moving a background image instead of swapping it out.  You have one image file with both states of your rollover and use the css to define what part of the image is showing when.  It is speedy and also requires fewer image files, so less clutter.

Hooray for a:hover!