Thursday, October 30, 2008

[jQuery] Re: can't check background-color

.css("background", "red") works as a setter, but for a getter, you'll need to be more specific, .css("background-color"). However, each browser will return the value differently.

- Richard

On Thu, Oct 30, 2008 at 1:18 AM, salihriza <ismailsavran@gmail.com> wrote:

how can i check my div background color? that condition is not seem
valid....

   if($("#mydiv").css('background')=="red")

No comments: