View Full Version : fading in div with opacity

15 Jan 2010, 7:33 PM
I have a div which through css I have already given an opacity to. I want to now fade it in with Ext.js by using Ext.get('shade').fadeIn(2).

div#shade {
background-color: #000;
height: 100%;
left: 0;
position: fixed;
opacity: 0.6;
top: 0;
width: 100%;

I am using this to cover the entire screen. It works for fading out perfectly. When I fade in with firefox it fades all the way to black like opacity 100%, then it fades to the css opacity. In IE it fades all the way to black and never goes back to the css opacity. I want it to just fade in straight to 60% opacity.

Perhaps I should set the opacity using the ext.js? if there is a way. Or what can I do so it fades in to 60%?

16 Jan 2010, 1:20 AM
You can specify endOpacity in the arg OBJECT to fadeIn

Check the args in the docs. It's an OBJECT.

You can't specify startOpacity because they forgot it!

But http://www.extjs.com/forum/showthread.php?p=390425#post390425