Link to home
Start Free TrialLog in
Avatar of hidrau
hidrauFlag for Brazil

asked on

how to check if the css of my table is background-color = yellow?

I have a function but this function to do what it needs to do must check if a css attribute has a determine value. How to do this?

  if ($("#" + vprd).css("background-color","yellow") ..... ???

thanks
ASKER CERTIFIED SOLUTION
Avatar of Eyal
Eyal
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hidrau

ASKER

thanks
Avatar of hidrau

ASKER

it is strange, because the test didn't work, I have yellow in background-color and it returns that there is yellow color.

I got the value of background in the alert and it returned me this:

rgb(255, 255, 0)

is it correct?
Avatar of hidrau

ASKER

humm - explorer returned the name yellow, but firefox not :((
rgb(255, 255, 0) is yellow
Avatar of hidrau

ASKER

ok, but I need to prevent this too, right? two possible return

would it be:

if ($("#" + vprd).css("background-color")==rgb(255, 255, 0))  ???
Avatar of hidrau

ASKER

I got it

thanks