用chrome查看通过jquery绑定的事件

// Bind up a couple of event handlers
​$("#foo").on({
    click: function(){ alert("Hello") },
    mouseout: function(){ alert("World") }
});​​​

// Lookup events for this particular Element
​$._data( $("#foo")[0], "events" );

 

Chrome F12-Sources-给表达式​$._data( $("#foo")[0], "events" );add watch.

 

查看表达式的值,在handler function上右键-查看函数定义即可

 

 

 

 

 

 

 

 

 

 

 

javascript - Can I find events bound on an element with jQuery? - Stack Overflow
http://stackoverflow.com/questions/2008592/can-i-find-events-bound-on-an-element-with-jquery#

posted on 2015-07-30 09:27  yy2056  阅读(494)  评论(0)    收藏  举报

导航