Changing Opacity of All Elements but One Div

Posted by waiwai933 on Stack Overflow See other posts from Stack Overflow or by waiwai933
Published on 2010-04-18T04:19:32Z Indexed on 2010/04/18 4:23 UTC
Read the original article Hit count: 406

Filed under:
|
|
|
|

I'm trying to fade all elements on a webpage except for one div. I've been able to fade all the elements with the following jQuery:

$('*').css('opacity', .3);

However, it seems as if opacity is a property that inherits from parent elements, even if I explicitly set the opacity of the div to 1. I'm drawing a blank as to any solutions right now, so can I have some help here?

© Stack Overflow or respective owner

Related posts about css

Related posts about css-selectors