IE7 Opacity Filter with JQuery methods

So I have an undisplayed div that has an opacity applied to it which is triggered by a Jquery method to be fadeIn with a certain event. This doesn’t work with IE7.

Code:

<script type="text/javascript">
$(function(){
     $('#fade').fadeIn();                   // does NOT work on IE7 with filter Opacity
});
</script>
<div id="fade" style="position:absolute; z-index:20; top:0; left:0; background-color:#000; opacity:0.7; filter:alpha(opacity=70); zoom:1;"></div> 

For this reason, fadeIn() is not the solution here. Here’s the right code:

  $('#fade').fadeTo("slow", 0.7);
Advertisements