小编Tom*_*m G的帖子

Jquery .on with doubleclick事件

为什么这样做:

$(document).on("dblclick", "#areaA tr:has(td)", function(e) {
     //code here
 });
Run Code Online (Sandbox Code Playgroud)

而这不是

$("#areaA tr:has(td)").on('dblclick', function(e) {
    //Code here
});
Run Code Online (Sandbox Code Playgroud)

我正在关注jquery文档页面上的示例,但我的双击不会触发.当我第一次这样做时,它可以工作,但似乎它会两次触发事件.

这是在Kendo UI网格的上下文中.

这两段代码之间真的有区别吗?

jquery

57
推荐指数
2
解决办法
8万
查看次数

标签 统计

jquery ×1