I wish to change the text-shadow attribute of elements with javascript. As far as I know jquery css does not work with text-shadow.
Does anyone have any suggestions for dynamically changing text-shadow.
Thanks!
I wish to change the text-shadow attribute of elements with javascript. As far as I know jquery css does not work with text-shadow.
Does anyone have any suggestions for dynamically changing text-shadow.
Thanks!
Works for me (Chrome and FF, not IE).
Try using camelCase. When working with CSS properties in JavaScript, you have to remove the hyphen (for example, "background-image" would become "backgroundImage") and then set the properties.
So your code should read:
$('#bla').css('textShadow','#6374AB 20px -12px 2px');