SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    Dec 2008
    Location
    Plymouth, United Kingdon
    Posts
    449
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jquery: IE doesnt fade in with animate()

    Hi,
    Does anyone know why IE does not fade in the image with animate() like firefox does?

    here is my jquery code,

    Code:
    $(document).ready(function(){
    	
    	$("#supersize").css({ 
    		opacity: '.0',
    		filter: 'alpha(opacity=0)'
    		});
    	
    	$("#supersize").animate({ 
    		opacity: '1.0',
    		filter: 'alpha(opacity=100)'
          	}, 1500);
    
    });

    html,

    Code:
    <div id="supersize">
    	<ul>
        	<li class="active" href="#"><img src="img_content/large/bg_01.jpg" alt="background"/></li>
        </ul>
    </div>
    Here is the link to see the page,
    http://lauthiamkok.net/tmp/jquery/animate/

    Many thanks if you have any idea...

    Cheers,
    Lau

  2. #2
    SitePoint Addict
    Join Date
    Apr 2007
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    why not use...

    Code:
    $('#supersize').fadeTo(1500, 1);
    It is probably not working because animate will recognize numbers and '1.0' would be a string and not a number.

  3. #3
    SitePoint Evangelist
    Join Date
    Dec 2008
    Location
    Plymouth, United Kingdon
    Posts
    449
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by semantic7 View Post
    why not use...

    Code:
    $('#supersize').fadeTo(1500, 1);
    It is probably not working because animate will recognize numbers and '1.0' would be a string and not a number.
    yes it now works better with fadeTo() in IE. Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •