JSFiddle - React, Tailwind, and code Playground
by Muskar
HTML
<div id="container">
<img id="image1" src="http://lorempixel.com/20/20">
<div id="anotherContainer">
<img id="image2" src="http://lorempixel.com/20/20">
</div>
<!--Pretend there's tons of other elements in here-->
</div>
JavaScript
$(function() {
$("#image1").click(function() {
debugger;
});
$("#image2").click(function() {
debugger;
});
//Pretend we no longer know the id's of the things we want to debug,
//or are not interested in only viewing a single element.
//E.g. if you added elements dynamically within a scope.
//This is how you could find the events:
var elems = $("img", $("#container"));
var events = [];
$(elems).each(function(i, element) {
events.push($._data(element, "events"));
});
console.log(events);
});