The example in this article describes how jQuery implements the progress bar effect displayed at the top of the page. Share it with everyone for your reference, the details are as follows:
The specific code is as follows:
<!Doctype html> <html> <head> <title>页面顶部显示的进度条效果</title> <meta http-equiv=Content-Type content="text/html;charset=utf-8"> </head> <body> <div id="web_loading"><div></div></div> <script src="jquery1.8.3.min.js" type="text/javascript"></script> <script type="text/javascript">// < ![CDATA[ jQuery(document).ready(function(){ jQuery("#web_loading div").animate({width:"100%"},800,function(){ setTimeout(function(){jQuery("#web_loading div").fadeOut(500); }); }); }); // ]]></script> <style> #web_loading{ z-index:99999; width:100%; } #web_loading div{ width:0; height:5px; background:#FF9F15; } </style </body> </html>
Click here for complete example codeDownload from this site.
I hope this article will be helpful to everyone in jQuery programming.