ry('.numBox').get(0).getBoundingClientRect().top; var first_bottom2=jQuery('.operateBox').get(0).getBoundingClientRect().bottom; var first_item_height=jQuery('.first_item').get(0).clientHeight; var num=1; var medal=Math.ceil(num/4)*55; var height=first_item_height+medal+100; jQuery(function(){ window.onscroll=function(){ if(first_bottom2-first_top>height){ var top1=jQuery('.numBox').get(0).getBoundingClientRect().top; var bottom2=jQuery('.operateBox').get(0).getBoundingClientRect().bottom; if (top1 < 0 && bottom2 > height) { //jQuery('.first_item').css({position: "fixed", top: 0}); //jQuery('.numBox').next('.viewthread-content').css("margin-left", '190px'); } if(top1<0 && bottom2 0) { //jQuery('.first_item').css({position: "relative",top:0}); //jQuery('.numBox').next('.viewthread-content').css("margin-left", '0'); } } } })
快速回复 返回顶部 返回列表