What is the difference between the click and tap events?

前端 未结 4 544
暗喜
暗喜 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 19:40

    You can use .on() to bind a function to multiple events:

    $('#element').on('click tap', function() {
        ...
    });
    

    Thanks to @bergie3000 for pointing to this

提交回复
热议问题