/*跟随窗口大小的高度*/ $(function(){ var winHeight=$(window).height(); if(winHeight>=380){ $(".SSTi-SZGD").css("height",winHeight); $(".topic").css("top",winHeight*0.35); } else{ winHeight=380; $(".SSTi-SZGD").css("height",winHeight); $(".topic").css("top",winHeight*0.35); } $(window).resize(function(){ winHeight=$(window).height(); if(winHeight>=380){ $(".SSTi-SZGD").css("height",winHeight); $(".topic").css("top",winHeight*0.35); }else{ winHeight=380; $(".SSTi-SZGD").css("height",winHeight); $(".topic").css("top",winHeight*0.35); } }); });
/*延时加载*/ $(function(){
var winHeight=$(window).height(); var AbstractTop=$(".Content").offset().top-$(window).scrollTop(); var footerTop=$(".footer_box").offset().top;
console.log(winHeight); console.log(footerTop); console.log($(window).scrollTop());
if(footerTop<winHeight-100){ setTimeout(function(){ $(".footer").addClass("a-fadeinB"); $(".footer").css("display","block"); },150); }
if(AbstractTop<winHeight-100){ setTimeout(function(){ $(".Abstract").addClass("a-fadeinR"); $(".Abstract").css("display","block"); },150); }
$(window).scroll(function(){
winHeight=$(window).height(); AbstractTop=$(".Content").offset().top-$(window).scrollTop(); footerTop=$(".footer_box").offset().top;
console.log(winHeight); console.log(footerTop); console.log($(window).scrollTop());
if(footerTop<winHeight-100){ setTimeout(function(){ $(".footer").addClass("a-fadeinB"); $(".footer").css("display","block"); },150); }
if(AbstractTop<winHeight-100){ setTimeout(function(){ $(".Abstract").addClass("a-fadeinR"); $(".Abstract").css("display","block"); },150); }
});
});