返回頂部按鈕-超出瀏覽器屏高時顯示,不然消失

$(document).scroll(function(){    var  scrollTop =  $(document).scrollTop(),bodyHeight = $(window).height();    if(scrollTop > bodyHeight){        $(".toTop").show();    }else{        $(".toTop").hide();    }});
相關文章
相關標籤/搜索