iscroll在手机上不能点击的问题
最近开发了一个手机端的网站,用iscroll做上拉刷新 下滑加载,用浏览器模拟手机没啥问题,用手机访问的时候就发现用了iscroll.js的内容点击事件/a标签这些东西失效了、失效了、失效了。后来看文档上有个options.click默认false表示限制了浏览器的点击事件,如果要支持点击事件需要手动设置成true。
原文:
To override the native scrolling iScroll has to inhibit some default browser behaviors, such as mouse clicks. If you want your application to respond to the click event you have to explicitly set this option to true. Please note that it is suggested to use the custom tap event instead (see below).
官网: