I believe you can simply do a

if( $(".information").css("background-color") == "#fff" ) {
  // your code
} else {
  // the rest of your code
}

http://docs.jquery.com/CSS/css#name


This is probably a better way of checking for equality among css
though....

Junos

On Aug 26, 1:18 pm, weegekid <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How (if it's possible) would I determine a specific css property for
> an element?
>
> For example, I have the following code on my page:
>
> <style>
> .information {display:block; background-color: #FFF}
> </style>
>
> <div class="information"><p>ipsum lorem</p></div>
>
> -------
>
> I'd then like to use jquery to determine the background-color of the
> element.  So that when a button or something is clicked:
>
> if the background-color of .information is #FFF, then do X, but if the
> background-color is #CCC, then do Y.
>
> Thanks for any help you can offer!

Reply via email to