I'm writing a custom highlight animation with Scriptaculous that includes a CSS3 glow. I get the box-shadow style and need to split it at the rgba alpha value, then vary that value to get the shadow to fade.
$('fresh').style.MozBoxShadow
would return
0 0 20px rgba(163, 238, 71, 1.0)
1.0
is the alpha value. I need to split it so that I can set:
$('fresh').style.MozBoxShadow = everythingBeforeAlphaValue + anAlphaValueIVaryWithJS + ')';
All the numbers can be any number of digits long, so I can't use substring
(and that's all I really know :) ). Can you help?