判断窗口滚动条是否到底的js+jquery

2011-02-18 13:47:12 by 【6yang】, 630 visits, 收藏 | 返回

$(function(){  
    // for window is footer?
    $(document).scroll(function(){
        var isFoot = ($(window).scrollTop() + $(window).height()) == $(document).height() ? alert("The window is Footer"):'';
    })
    
    //for div is footer?
    $(".scollBar").scroll(function(){
        var isFoot = ($(this).scrollTop() + $(this).height()) == $(".contentSc").height() ? alert("The div is Footer"):'';
    })
   
});

分享到:
share

    图片原图

    loading

    loading