title: CSS Cross-browser opacity from Javascript
body: <p>I want to turn down the opacity on an element when a user performs an action.</p>
  
  <p>The current code I have is:</p>
  
  <pre><code>document.getElementById('MyOpaqueElement').style.opacity = 0.3;
  // There are checks in the real code for NULL, etc.
  </code></pre>
  
  <p>This works on Firefox, Safari, etc.  IE8 has different ideas about opacity. I have read a couple of articles but have yet to find a definitive answer on the most portable method to do this in a cross-browser way.</p>