tags:

views:

594

answers:

2

I was wondering if there was any way to, using jQuery, animate properties of text-shadow like size or colour.

It's annoying that there aren't individual properties like text-shadow-color instead of the statement only being available in combined form.

A: 

Use javascript to parse the CSS property and create a new one

var myelement_shadow = $('myelement').css('text-shadow');

will give you the property

Use javascript's String functions to work with it: http://www.w3schools.com/jsref/jsref_obj_string.asp and parsefloat('2px') will give you just the 2

davidosomething
+1  A: 

As an alternative to using jQuery, you can use the powerful animation capabilities of the UIZE JavaScript Framework. See different elements of multiple text shadows being animated at the same time in the following example...

http://www.uize.com/examples/hover-fader-text-shadow-animation.html

Chris van Rensburg