1

我的 javascript 代码有一些问题,需要使用开发人员工具(谷歌浏览器)跟踪 jQuery 事件绑定。你知道一些插件或工具吗?

PS Chrome 开发者工具事件跟踪跟踪 javascript 事件。jQuery 事件更难

4

1 回答 1

1

没有区别..只需将事件注销到控制台,甚至可以使用一个不错的小功能:

var log = function(e){

   console.log(e)

}

$('#element).eventListener(log);

或内联:

$('#element).eventListener(function(e){
   console.log(e);
 });

如果您想查看事件气泡的目标,请使用 currentTarget - http://api.jquery.com/event.currenttarget/

于 2014-07-09T14:25:54.317 回答