如何解决jQuery在移动端的双击事件冲突问题?
- 内容介绍
- 文章标签
- 相关推荐
本文共计43个文字,预计阅读时间需要1分钟。
jQuery双击事件移动端解决方案.txt
/*$("#btn1").on("click", function(){ if( new Date().getTime() - touchtime < 500 ){ console.log("dblclick"); }else{ touchtime = new Date().getTime(); console.log("click") } });*/
本文共计43个文字,预计阅读时间需要1分钟。
jQuery双击事件移动端解决方案.txt
/*$("#btn1").on("click", function(){ if( new Date().getTime() - touchtime < 500 ){ console.log("dblclick"); }else{ touchtime = new Date().getTime(); console.log("click") } });*/

