Using Edwin Martin's jQuery plugin for shadow animation, which extends the .animate method, you can simply use the normal syntax with "boxShadow" and every facet of that - color, the x- and y-offset, the blur-radius and spread-radius - gets animated. It includes multiple shadow support.
jQuery animates by changing the style property of DOM elements, which can cause surprises with specificity and moves style information out of your stylesheets.
I can't find browser support stats for CSS shadow animation, but you might consider using jQuery to apply an animation-based class instead of handling the animation directly. For example, you can define a box-shadow animation in your stylesheet:
Here is an example of how to do it without a plugin: jQuery animated Box But it doesn't have the extra functionality that comes with the use of a plugin, but I personally like to see (and understand) the method behind the madness.
I love the ShaneSauce solution !
Use a class intead of an ID and you can add/remove the effect to any element using jQuery addClass/delay/removeClass :