Jquery固定边栏滚动特效核心代码:
$(window).scroll(function() {
    var windowHeight = $(window).scrollTop() + $(window).height();
    var sideHeight = $('#J_BdSide').height();
    if (windowHeight > sideHeight) {
        $('#J_BdSide').css({
            'position' : 'fixed',
            right : '0px',
            top : -(sideHeight - $(window).height())
        });
    } else {
        $('#J_BdSide').css({
            'position' : 'static'
        });
    }
});

上一篇:微信小程序教程九:组件

下一篇:如何设置修改MySQL初始密码