平滑的进度条加载网页内容
XML/HTML Code
- <section class="container">
- <div class="progress"> <span class="blue" style="width:0%;"><span>0%</span></span> </div>
- </section>
JavaScript Code
- <script type='text/javascript'>
- function loading(percent){
- $('.progress span').animate({width:percent},1000,function(){
- $(this).children().html(percent);
- if(percent=='100%'){
- $(this).children().html('Loading Complete, Redirect to Home Page... ');
- setTimeout(function(){
- $('.container').fadeOut();
- location.href="http://www.freejs.net";
- },1000);
- }
- })
- }
- </script>
原文地址:http://www.freejs.net/article_jquerywenzi_255.html