Quote Originally Posted by MiqDoloran View Post
Do you think we can add some CSS transitions to it? Actually, I think you can do the switch without using an inline handler at all and just use animations: JSFiddle. Though I'm not sure if this will work in the forums.
That method unfortunately has a few issues. For instance, it relies upon the default image being as larger or larger than the mouseover image in order to conceal it. If the default image is either smaller or contains transparency it will show the second image through it. Admittedly, this could be handled by making the second image innately transparent, and having it fade in while the other fades out. However, there is then the second issue, which is that absolute positioning means the images do not take up space in the document flow. If you were to place text following the images, it will be placed behind them. This can be handled via javascript getting the dimensions of the images and assigning them to the span, but that begins to get more complicated (and depending on the method used, may run into problems if the images are slow in loading). There is also the arguable issue that the transition is tied to hovering over the default image rather than the span, which could potentially be problematic if the images are of sufficiently different size.

That isn't to say such a method couldn't be worked out to utilize the fade in/out, but it would need to be more complex.