$(document).ready(function(){ //首先将#backtop隐藏 $("#backtop").hide(); //当滚动条的位置处于距顶部400像素以下时,跳转链接出现,否则消失 $(function () { $(window).scroll(function(){ if ($(window).scrolltop()>400){ $("#backtop").fadein(500); } else { $("#backtop").fadeout(500); } }); //当点击跳转链接后,回到页面顶部位置 $("#backtop").click(function(){ $('body,html').animate({scrolltop:0},500); return false; }); }); }); $(document).ready(function(){ $('.case .bd ul li').mouseover(function(){ var b=$(this).find('.txtinfo').outerheight(true); $(this).find('.txtinfo').stop().animate({"bottom": 0}, 100); }) $('.case .bd ul li').mouseout(function(){ var b=$(this).find('.txtinfo').outerheight(true); $(this).find('.txtinfo').stop().animate({"bottom":-36}, 100); }) var b=$('.txtinfo').length; for(var i=0;i b ? (a.classname = "pagenav fixtop", c && (a.style.top = d - b + "px")) : a.classname = "pagenav" } var a = document.getelementbyid("fixnav"); if (a == undefined) return ! 1; var b = 0, c, d = a; while (d) b += d.offsettop, d = d.offsetparent; c = window.activexobject && !window.xmlhttprequest; if (!c || !0) window.onscroll = buffer(e, 1, this) })(); }); $(document).ready(function(){ // 固定层 tel400 function buffer(a, b, c) { var d; return function() { if (d) return; d = settimeout(function() { a.call(this), d = undefined }, b) } } (function() { function e() { var d = document.body.scrolltop || document.documentelement.scrolltop; d > b ? (a.classname = "tel400 fixtop400", c && (a.style.top = d - b + "px")) : a.classname = "tel400" } var a = document.getelementbyid("fixnav400"); if (a == undefined) return ! 1; var b = 0, c, d = a; while (d) b += d.offsettop, d = d.offsetparent; c = window.activexobject && !window.xmlhttprequest; if (!c || !0) window.onscroll = buffer(e, 1, this) })(); });