滾動條監聽

$(window).scroll(function(){
    var $nav = $(".navBar");
    if($nav.length>0){
        (($(window).scrollTop() + $(window).height() - $(document).height() + $nav.outerHeight()*2)>=0) ? $nav.fadeIn() : $nav.fadeOut();
    }
});io

相關文章
相關標籤/搜索