Advertisement
salmancreation

How to add perloader spiner in your html template

Aug 14th, 2015
701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.92 KB | None | 0 0
  1. <!----- Preloader  Index ------->
  2.        
  3. <div id="perloader">
  4.     <div class="spiner_perloader"></div>
  5. </div>
  6.  
  7. /*---------------------------
  8. Preloader Area CSS Code  
  9. ----------------------------*/
  10. body.perloader_active{position:absolute;width:100%;height:100%;left:0;top:0;overflow:hidden}
  11. #perloader{position:absolute;width:100%;height:100%;left:0;top:0;background:#fff;content:"";z-index:9999}
  12. .spiner_perloader{position:absolute;width:64px;height:64px;left:50%;top:50%;
  13. background:url(img/spiner.gif) no-repeat scroll center center;display:block;content:"";
  14. margin-left:-32px;margin-top:-32px;
  15. }
  16.  
  17. Jquery
  18. ----------------------------------
  19. $(document).ready(function(){
  20.     $("body").addClass("perloader_active");
  21. });
  22. -----------------------------------
  23.     $(window).load(function(){
  24.        
  25.         $("#perloader").fadeOut();
  26.         $(".spiner_perloader").delay(350).fadeOut();
  27.         $("body").removeClass("perloader_active");
  28.        
  29.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement