地址:https://github.com/ftlabs/fastclick/tree/main/lib
在JS中使用:
//1.引入
<script type='application/javascript' src='/path/to/fastclick.js'></script>
//2.初始化
if ('addEventListener' in document) {
document.addEventListener('DOMContentLoaded', function() {
FastClick.attach(document.body);
}, false);
}
//3.
element.addEventListener('click',function(){
//内容
})
在JQ中使用: