且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

jQuery Mobile:用vclick事件替换click事件

更新时间:2022-12-19 18:54:11

由于某种原因,我可以进行以下操作:

For some reason, I got the following to work:

$('a').bind('vclick click',function(e){
  e.preventDefault();
   //do some stuff//
 })

如果没有e.preventDefault(),则事件触发两次.有了它,它只会发射一次(但是会发射)

Without the e.preventDefault() the event fires twice. With it, it only fires once (but it does fire)

这与您所说的相似,但可能涵盖所有内容.

This is similar to what you stated, but may be more all encompassing.