JSFiddle - React, Tailwind, and code Playground

by sajjansarkar

HTML

<div id="outer" style="background-color:orange;width:300px;height:300px;">
    <div id="inner" style="background-color:red;">
         <p>Lorem Ipsum</p>
    </div>
</div>

JavaScript

$("#inner").click(function(event){
  event.stopPropagation();
  // do something
}); 
$("#outer").click(function(event){
  alert('here!');
  $(this).hide();  
});