Check opacity by jQuery

James picture James · Mar 14, 2011 · Viewed 40.7k times · Source

How do I check if the opacity of an element is 0, and then do something in jQuery?

Answer

Christian Mann picture Christian Mann · Mar 14, 2011

Have you tried using .css()?

if($('elemFoo').css('opacity') == 0) {
    doSomething();
}