jQuery check if element have css attribute

Posted by Mircea on Stack Overflow See other posts from Stack Overflow or by Mircea
Published on 2010-04-21T18:54:31Z Indexed on 2010/04/21 19:03 UTC
Read the original article Hit count: 207

Filed under:
|

I need to know when I click on an element if this element have a css option. I am thinking at something like this but it does not work:

if ($('#element').attr("text-shadow")) {
    alert ('i Have')
}
else {
    alert ('i dont')
}

Any tips on this one? Thanx

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about attribute