JSFiddle - React, Tailwind, and code Playground
HTML
<div id="xxx" style="background: red;">
<iframe width="420" height="315"
src="https://www.youtube.com/embed/JGwWNGJdvx8">
</iframe>
</div>
JavaScript
$(function() {
$("body").click(function(e) {
if (e.target.id == "xxx") {
alert("Inside div");
}
});
})