Using JQuery Display Loading Image While Page Loads for PHP, ASP.Net, HTML


On April 10

Using JQuery Display Loading Image While Page Loads for PHP, ASP.Net, HTML


  1. Select loading .gif image.

  2. Add the following div tag in html body element possibly immediately after start body tag : <div class="page_load"></div>

  3. Add CSS to in head tag :  .loader { position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; z-index: 9999; background: url('images/loader.gif') 50% 50% no-repeat rgb(255,255,255); }

  4. Add jquery in the head tag :  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript"> $(window).load(function() { $(".page_load").fadeOut("slow"); }) </script>

You may also like :





Responses