Last modified: 2012-08-13 17:47:44 UTC
The <img> with javascript event is: * is somewhat slow (event handling, DOM manipulation etc.) * Causes a short flash on first hover of every icon (the image needs to be downloaded first) * Make the document larger * Maybe semantics? Use CSS instead with background-image and the :hover selector. That fixes all of the above: * Faster (smaller dom, no event binding, no dom manipulation) * No blink/flash (you can use @embed to have both icons embedded, less bandwidth, fewer http requests and the hover image will be present at all times).