$(document).scroll不仅仅在IE8中触发 [英] $(document).scroll is not firing in IE8 only

查看:134
本文介绍了$(document).scroll不仅仅在IE8中触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站运行一些JavaScript。仅在IE8中,使用或不使用鼠标滚轮滚动时,$(文档).scroll不会触发。
下面的代码片段:

I have a site running some javascript. In IE8 only, the $(document).scroll is not firing when you scroll with or without the mousewheel. Code snippet below:

$(document).scroll(function () {
        //do something on scroll
      });

是否有特定原因此功能不会在IE8中触发?我在线搜索没有成功。

Is there a specific reason this function won't fire in IE8? I have searched online with no success.

提前感谢所有建议和提示!!!!!

Thanks for all advice and tips in advance!!!!!

推荐答案

尝试使用窗口

  $(window).scroll(function () {
    //do something on scroll
  });

这篇关于$(document).scroll不仅仅在IE8中触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆