标签:int i++ fine window undefined var define top size
<div id="preloader" style="display: none;"> <div id="status" style="display: none;"></div> <div id="loading" style="display: none;"> <span id="lmun" style="font-family:‘微软雅黑‘; font-size:">100</span>% </div> </div>
$(window).load(function() { var i = 0; function show(){ i++; $("#lmun").html(i); if($("#lmun").html()==100){ $(‘#status‘).fadeOut(); $(‘#loading‘).fadeOut(); $(‘#preloader‘).delay(100).fadeOut(‘slow‘,function(){ var _hash = window.location.hash; if(typeof(_hash) != ‘undefined‘ && _hash != ‘‘){ $(‘html, body‘).stop().animate({ scrollTop: $(_hash).offset().top }, 1000); } }); clearInterval(sh); } } sh=setInterval(show,10); });
标签:int i++ fine window undefined var define top size
原文地址:http://www.cnblogs.com/lcf1314/p/7066726.html