title: How to detect if an element is not visible in a fast way in JavaScript?
body: <p>In the past we used the CSS attribute "display" to show and hide DOM elements. To check if an element is visible, we could just use:</p>
  
  <pre>element.offsetWidth > 0</pre>
  
  <p>Since we had some problems with Flash and Java Applets (they stop when they get display:none) we switched to the CSS attribute "visibility".</p>
  
  <p>I am now looking for a fast and easy way to check if an element is not visible.</p>
  
  <p>I have tried the following:</p>
  
  <ul>
  <li>Checking the attribute itself on the element and and all parents => too slow</li>
  <li>Checking the calculated style directly from the browser (element.currentStyle or window.getComputedStyle() plus getPropertyValue(style property)) => also too slow</li>
  </ul>
  
  <p>Do you know any other way or shortcut to see if an element is visible?</p>