首页 > 其他 > 详细

加载资源方式

时间:2017-06-22 19:39:10      阅读:317      评论:0      收藏:0      [点我收藏+]
<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);
	});

  

加载资源方式

原文:http://www.cnblogs.com/lcf1314/p/7066726.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!