Page 1 of 1

Validate CSS with Javascript

Posted: Sat May 03, 2014 2:22 am
by anon

Can anyone attest to whether this is possible? I would think so.

if (Appery("myID").css('background') === '#BBBBBB'){
alert("true");
}
else {
alert ("false");
}

How would I accomplish this assuming the color was indeed true


Validate CSS with Javascript

Posted: Sat May 03, 2014 5:42 am
by Igor

Hello,

Your code return RGB not HEX color.
This should help:
http://stackoverflow.com/questions/59...