爆破熊
2014-08-26 18:35
var JWin = $(window);
jWin.scroll(function()){
var scrollHeight = jWin.scrollTop();
var screenHeight = jWin.height();
var sideHeight = $('#J_BdSide').height();
if(scrollHeight+screenHeight>sideHeight){
$('#J_Bdside').css({
'position':'fixed',
'top':-(sideHeight-screenHeight),
'right':0
})
}else{
$('#J_Bdside').css({
'position':'static'
})
}
}
还没有人回答问题,可以看看其他问题
固定边栏滚动特效
38884 学习 · 55 问题
相似问题