In my CSS file:
a, a:link, a:visited { color:#4188FB; }
a:active, a:focus, a:hover { color:#FFCC00; }
I tried with:
var link_col = $("a:link").css("color");
alert(link_col); // returns rgb(65, 136, 251)
How can I get the HEX code?
*** edit: found the answer here:
Background-color hex to JavaScript variable
Shame on me, could have search a bit better before posting..
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…