Chrome gives you the currently selected element in the inspector with $0
. If you select a button in the DOM you can set and inspect the event handler with the following two code lines:
$($0).on('click', function() { console.log('Hello') })
jQuery._data($0, "events").click[0].handler
// => "function () { console.log('Hello') }"
This is useful for debugging.
Posted by Emanuel to makandra dev (2016-12-15 14:15)