How can i fix the loading gif after the page is fully loaded?

I want my gif animation to fade out after the page is fully loading. The gif still appears after loading right now. I tried some fadeOut javascript, but the whole page is faded out. If you can help, it’ll be really appreciated, Here’s my code.

var $body = $('.loading');

var loading = [
    { elements: $body, properties: { width: '3%' } },
    { elements: $body, properties: { width: '60%' } },
    { elements: $body, properties: { width: '90%' } },
    { elements: $body, properties: { width: '100%' } },
    { elements: $body, properties: { height: '1260px' }, options: { 
      complete: function () { 
        $('.wrap').velocity( 'transition.slideLeftIn' );
        $('html').css({ background: 'white' });
      }
    }
  }
]; 

$.Velocity.RunSequence(loading);
<style>
.loading {
  background: url("../img/icon.gif");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 40px;
  min-height: 100px;
  display: block;
  position: absolute;
  margin: auto;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

.wrap {
  opacity:0;
  transform: none;
}
</style>
<div class="loading">
<div class="wrap">contents</div>
</div>

176 thoughts on “How can i fix the loading gif after the page is fully loaded?”

  1. Pingback: cialismars.com
  2. Pingback: cialis for sale
  3. Pingback: viagra price
  4. Pingback: viagra samples
  5. Pingback: sildenafil citrate
  6. Pingback: best cheap viagra
  7. Pingback: order viagra
  8. Pingback: cheap viagra
  9. Pingback: sildenafil 20 mg
  10. Pingback: viagra nz
  11. Pingback: tadalafil tablet
  12. Pingback: natural viagra
  13. Pingback: sildenafil generic
  14. Pingback: buy viagra online
  15. Pingback: viagra cheap
  16. Pingback: viagra otc
  17. Pingback: viagra prices
  18. Pingback: viagra tablets
  19. Pingback: hims viagra
  20. Pingback: viagra para mujer
  21. Pingback: viagra cialis
  22. Pingback: teva sildenafil
  23. Pingback: sildenafil goodrx
  24. Pingback: buy cialis
  25. Wonderful goods from you, man. I have understand your stuff previous to and you are just too wonderful.

    I actually like what you’ve acquired here, certainly like what you’re stating and
    the way in which you say it. You make it entertaining and you still care for to
    keep it sensible. I can’t wait to read much more
    from you. This is really a wonderful web site.

    Reply
  26. Hello there! I know this is somewhat off topic but I was wondering which blog platform are you using for
    this site? I’m getting fed up of WordPress
    because I’ve had issues with hackers and I’m looking at alternatives for another platform.

    I would be awesome if you could point me in the direction of a good
    platform.

    Reply
  27. Hey! Do you know if they make any plugins to help with SEO?
    I’m trying to get my blog to rank for some targeted
    keywords but I’m not seeing very good results. If you know
    of any please share. Many thanks!

    Reply
  28. You are so interesting! I do not suppose I’ve read a single thing like this before.
    So great to find somebody with a few unique thoughts on this issue.
    Seriously.. many thanks for starting this up. This site is something
    that’s needed on the web, someone with a little originality!

    Reply
  29. Hi there very cool web site!! Guy .. Excellent .. Wonderful ..
    I’ll bookmark your web site and take the feeds additionally?
    I’m happy to find so many useful information here within the post, we want develop more strategies in this regard,
    thanks for sharing. . . . . .

    Reply
  30. Magnificent goods from you, man. I’ve keep in mind your stuff
    prior to and you’re just extremely great. I really like what you have acquired right here, certainly like what you are
    stating and the way in which during which you assert it. You’re making it enjoyable and you continue to care for to keep it smart.
    I cant wait to learn much more from you. That is
    actually a tremendous web site.

    Reply
  31. Hi there! This is kind of off topic but I need some advice from an established blog.
    Is it difficult to set up your own blog? I’m not very techincal but I can figure things out pretty
    quick. I’m thinking about making my own but I’m not sure where to
    start. Do you have any points or suggestions? Appreciate
    it

    Reply
  32. Appreciating the persistence you put into your site and
    detailed information you offer. It’s nice to come across
    a blog every once in a while that isn’t the same out of date
    rehashed information. Fantastic read! I’ve bookmarked your
    site and I’m including your RSS feeds to my Google account.

    Reply
  33. Good day! This is kind of off topic but I need some guidance from
    an established blog. Is it difficult to set up your
    own blog? I’m not very techincal but I can figure things out pretty fast.
    I’m thinking about making my own but I’m not sure where to start.
    Do you have any tips or suggestions? Thank
    you

    Reply
  34. Hello would you mind letting me know which hosting company you’re using?
    I’ve loaded your blog in 3 different internet browsers and I must say this blog loads
    a lot faster then most. Can you suggest a good hosting provider at a reasonable price?
    Thanks, I appreciate it!

    Reply