iOS当前处理onscroll事件的方式在
here中描述.基本上不是在页面/元素滚动时发送多个onscroll事件,而是在页面/元素停止滚动后发送一个onscroll事件.
这会在编写动态网站脚本时产生不同的问题,并且需要回退来处理它.
我的问题是,是否有一种Modernizr风格的方式来处理这种“缺乏功能”.处理它的另一种方法是检测正在使用的设备,这不是真正理想的(未来 – iOS 7来了,突然支持所有设备,我的网站仍然显示后备).
解决方法
这在现阶段是无法察觉的.
看到:
https://github.com/Modernizr/Modernizr/wiki/Undetectables
看到:
https://github.com/Modernizr/Modernizr/wiki/Undetectables
whether a scroll wheel event is coming from a continuous device like a trackpad or the Magic Mouse or from a traditional clicking scroll wheel (in webkit).