In jQuery mobile, what's the diff between tap and vclick?

后端 未结 3 549
野性不改
野性不改 2020-12-01 08:25

which event should i use to listen to ? why use vclick? and I just don\'t know which situation to use which.

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-01 09:00

    vclick (virtualized click) simulates the onclick event.

    http://api.jquerymobile.com/vclick/

    Tap event triggers after a quick, complete touch event single target object.

    http://api.jquerymobile.com/tap/

    It depends what you are doing but unless you have a specific reason not to (e.g. supporting desktop and mobile with the same js) I would use tap.

    More information here https://coderwall.com/p/bdxjzg

提交回复
热议问题