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

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -