Text shadow color

Text shadow color

Hi All,

I'm trying to set a new color for text-shadow. I'm pulling the x, y & blur values ok, but when I try to set a new color, it keeps telling me "Invalid character: # " on line #8.

  1. var ts = $('.firstLetter span.fa').css('text-shadow').split(' ');
  2.   console.log('tS: ' + ts); // tS: rgb(85,,85,,85),1px,2px,3px
  3.   var x1 = ts[3];
  4.   var y1 = ts[4];
  5.   var b1 = ts[5];
  6.   console.log('Shadow-xyb: ' + x1 + ' ' + y1 + ' ' + b1); // Shadow-xyb: 1px 2px 3px
  7.   $('.firstLetter span.fa').css('text-shadow', x1 + 'px ' + y1 + 'px ' + b1 + 'px ' + #ff0000);

I even tried using rgb(x,x,x) but still wouldn't work.  What am I doing wrong?

Thanks,  Bill

Update:  SOLVED - For those who may have the same problem - you don't need to add the px to the callout, i.e., they are added automatically.
    • Topic Participants

    • bill