Skip to content Skip to sidebar Skip to footer

Setting Opacity Of Dynamically Generated Element In Ie7

I'm creating a div in js and setting it's opacity. This works no problem in IE8: var div = document.createElement('div'); div.setAttribute('style', 'opacity: 0; visibility: hidden;

Solution 1:

I believe the format for IE7 in JS is more like:

element.style.filter = "alpha(opacity="+ value +")"

Solution 2:

It is important to note that the alpha filter will not work in IE7 without also setting the width. This was a hard-earned discovery.

Post a Comment for "Setting Opacity Of Dynamically Generated Element In Ie7"