views:

96

answers:

5

I'm using fadeIn to fade in my BG DIV's.

example: http://commonmovement.com/MIP/about-mip.html

This works in all browsers except IE, where it just "pops" on. Not sure how to fix this.

I tried using:

$('#main.about_main').css('filter', 'alpha(opacity=0)'); $('#main.about_main').fadeIn(2000);

but no luck.

CSS:

#main { height:100%; width:100%; padding:0; }

#main.about_main {display: none;}

Anyone know how to fix this?

Thanks

A: 
$('#main.about_main').css('filter', 'alpha(opacity=0)');

The DIV is transparent. Then how can it be seen?

nil
I saw this on another post about the same issue and thought it was worth a try.
`filter` is IE specific. This line of CSS set the `div` to transparent, so no matter it's `display` is `none` or `block`, it won't be seen.
nil
A: 

Is that first line with the filter necessary? Have you tried it without? The display:none in the style sheet should be enough.

Matt Sherman
Aparently it's not.
+3  A: 

Try the following:

$('#main').hide().fadeIn(2000);
Ben Rowe
I wouldn't even put the `.about_main` qualifier there but otherwise +1, this is how I'd do it (assuming you didn't do CSS `display: none` for `#main`).
cletus
@cletus, thanks. Didn't even notice that when I copied it...
Ben Rowe
A: 

I guess your problem is not with IE, it's performance.

In my IE 8 worked just fine, but a pretty slow and ugly transition. On Chrome was pretty fluid

As you go to IE 7 or even 6 the performance should slower, because big DIV animation demands more from the browser.

Can you test this under IE 9? Or even on IE 8 on a machine with better CPU + RAM?

Israel Rodriguez
It works great on a higher end machine. I think the img file sizes are an issue