jQuery(document).ready(function($){ $("img").lazyload({ placeholder:"http://www.zzmnls.com/statics/js/lazyload/grey.gif", effect:"fadeIn", threshold:200, }); }); var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?85f23107294aedfa5543337898139042"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); $(window).scroll(function(){ var sc=$(window).scrollTop(); var rwidth=$(window).width() if(sc>0){ $("#goTopBtn").css("display","block"); $("#goTopBtn").css("left",(rwidth-50)+"px") }else{ $("#goTopBtn").css("display","none"); } }) $("#goTopBtn").click(function(){ var sc=$(window).scrollTop(); $('body,html').animate({scrollTop:0},500); });