监听滚动条和浏览器大小变化:

$(document).ready(function() {
            //监听滚动条的变化
            $(window).scroll(function() {
                ddd();
            });                
            //监听浏览器大小变化
            $(window).bind("resize", ddd);
        });

一个dom元素距离页面顶部(包括了滚动条)的位置:

$template.offset().top;

滚动条到顶部的垂直高度 :

$(document).scrollTop()

可视高度:

$(window).height()

页面高度:

$(document).height()

 

 

 

相关文章:

  • 2022-12-23
  • 2021-05-02
  • 2022-02-10
  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
猜你喜欢
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案