What is the difference between the click and tap events?

前端 未结 4 546
暗喜
暗喜 2020-12-04 19:32

I am developing an app that runs on Android/iOS and desktop computers.

Should I use the click or the tap event?

What are the differ

4条回答
  •  醉话见心
    2020-12-04 20:02

    Touch events and mouse events are entirely different beasts. They are not interchangeable.

    That said, I'm using jQuery Touch Punch which maps touch events to their mouse event analogs, so a tap becomes the same thing as a click. This makes it possibly to use all the standard jQuery UI goodness without having to do any special touch event programming. It's extremely simple to use, and so far has worked perfectly for me on both iDevices and Android.

提交回复
热议问题