jquery - Modify a string in JavaScript -
i want modify color attribute returned in jquery. so, lets assume color returned , contained in
var color color = 'rgb(148, 141, 124)'
i want modify value of color be:
color = 'rgb(148, 141, 124, .7)'
(in other words, insert string ", .7")
you below:
color = color.replace(/\)/, ', 0.7)')
Comments
Post a Comment