var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?cc6ee28c0d245d53231ca9d9146f9719"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); // jQuery(".slideBox").slide({ // mainCell: ".bd ul", // autoPlay: true, // interTime: 4000 // }); $(window).scroll(function() { var scroll_len = $(window).scrollTop(); if (scroll_len > 300) { $('#Top').fadeIn(); } else { $('#Top').fadeOut(); }; }) $('#Top').click(function() { $("html,body").animate({ scrollTop: 0 }, 500); }) var myDate = new Date(); var year = myDate.getFullYear(); $('#year').text(year) $(function() { lrFixFooter("footer.footer"); function lrFixFooter(obj) { var footer = $(obj); var doc = $(document); function fixFooter() { //如果document的高度小于等于window的高度,就固定定位 if (doc.height() - 4 <= $(window).height()) { footer.css({ width: "100%", position: "absolute", left: 0, bottom: 0 }); } else { footer.css({ position: "static" }); } } fixFooter(); $(window).on('resize.footer', function() { fixFooter(); }); $(window).on('scroll.footer', function() { fixFooter(); }); } })