Its good to restrict Page Access until The Page Completely Loaded.
Demo
HTML to be added to the Page
CSS on the Page
JavaScript On the Page
Complete HTML
Demo
HTML to be added to the Page
- <div id="spinner"></div>
CSS on the Page
- #spinner {
- position: fixed;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
- z-index: 9999;
- background: url(Image/preloader-w8-cycle-black.gif) 50% 50% no-repeat #808080;
- }
JavaScript On the Page
- <script type="text/javascript">
- // <![CDATA[
- $(window).load(function () { $("#spinner").fadeOut("slow"); })
- // ]]></script>
Complete HTML
- <html>
- <head>
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- <style>
- #spinner {
- position: fixed;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
- z-index: 9999;
- *background: url(Image/preloader-w8-cycle-black.gif) 50% 50% no-repeat #808080;
- }
- </style>
- <!-- Preloader --><script type="text/javascript">// <![CDATA[
- $(window).load(function () { $("#spinner").fadeOut("slow"); })
- // ]]></script>
- </head>
- <body>
- <div id="spinner"></div>
- </body>
- </html>
0 comments:
Post a Comment