Jump to content

jQuery FadeIn doesn't work on IE

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1
Alhazred

Alhazred

    Learning Programmer

  • Members
  • PipPipPip
  • 99 posts
I'm creating a website, I'm working on the homepage and I'm trying to give it a fadein effect, it works on every browser but IE.

I've only imported the jQuery library and put just before </body> this code
<script type="text/javascript">
    $('body').hide();
    $('body').fadeIn(6000);
</script>
Why doesn't it work on IE?

This is the link to the test page
Ara.gì

#2
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
I've ran into this problem before as well. I asked around and was told it was just a bug. jQuery tries to make it as compatible with all browsers as possible but sometimes it's just not possible. You might try another method, instead of fading in, why not scroll in?

If you are set on fadein I found this link:

jQuery fadeIn() & fadeOut(): Problems in Internet Explorer | kevinleary.net

#3
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
most probably:
You put the script above at the top of your page and referenced the jquery library below in the page.So try the below code and see that it should work..

<html>
<title>Fading isn't it</title>
<body>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></scipt>
<script type="text/javascript">
$(document.ready(function(){
$('body').hide();
$('body').fadeIn();
}));
</script>
</body>
</html>

mind the "In" in fadeIn it is case sensitive

#4
Alhazred

Alhazred

    Learning Programmer

  • Members
  • PipPipPip
  • 99 posts
This made the same, works everywhere but not with IE.
I've solved applying the hide and fade effect to my 2 main divs in place than body.

$("#aragi-page-background-glare, #aragi-main").hide().fadeIn(6000);

This works on IE too.

#5
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
think ie doesn't like the Body tag getting the Display:none style when jquery call's the hide() method.
Could you check the error message ie throws when you execute the statement
I also found this..
http://www.codeguru.com/forum/showthread.php?p=1971157
Try to be loyal to a single forum always, when u do people will start respecting you and you get more richer answers

Edited by gokuajmes, 01 October 2010 - 02:10 AM.
try being loyal to Code Call


#6
Alhazred

Alhazred

    Learning Programmer

  • Members
  • PipPipPip
  • 99 posts
IE doens't give me any error, it looks it just ignore the fade effect.

I don't get the "loyal" part of your post, am I not allowed to ask for a solution to my problem on more than one forum?
I've get the solution on another forum (not the one you have found, a 3rd one), if I only asked here I was probably still looking for a solution.
I also go on reading ad answering to people on forums even if I've already solved the problem, if not, I was not here to write to you.
Is there anything wrong in what I say?

#7
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
Well you have nothing wrong the way you talk, and i didn't mean what you said for a meaning of loyal. This is a free world you can join any number of forums , post a billion topics anywhere. So nothing wrong with that.. happy programming