SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,657
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    I need help getting this easy jquery fadeIn statement correct?

    Good morning, I want to fadein with jquery but I dont want to use display none. Cant use opacity 0 because IE scews up my png. So I want to initially hide the image with left:-999em. Im using html.js .faqsnav {left:-999em;} because jquery is too slow to hide it otherwise. So then I need to bring it back to left:96px at the same time it's fading in. I think I have all the right puzzle peices here I hoping it's just the wrong format. How should it look? Thanks!

    $(document).ready(function() {
    $(".faqsnav").delay(4000).css( "left","96px", {queue:false} ).fadeIn(200);
    });

  2. #2
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,657
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    ok this seems to work but is it the best way? Seems a little hacky. I also dont want to use display none even via js

    $(document).ready(function() {
    $(".faqsnav").delay(4000).animate({left: '96px'},0).css( "display","none" ).fadeIn(1000);
    });

  3. #3
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,657
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    slow pokes. OK both of these work. IE scews up the png with the opacity one though

    $(document).ready(function() {
    $(".faqsnav").delay(4000).css( "left","96px").hide().fadeIn(500);
    });

    or

    $(document).ready(function() {
    $('.faqsnav').delay(3000).css('opacity',0).animate({opacity:1}, 500);
    });


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
  •