JSFiddle - React, Tailwind, and code Playground
by Mark Harwood
HTML
<div>
<h1>Hello</h1>
<p>What have I clicked today?</p>
<p>Open up web inspector or firebug to see the console.log()'s :)</p>
</div>
CSS
div {
background: #99cc00;
padding: 20px;
}
h1 {
padding: 5px;
background: #ccff00;
}
p {
background: red;
}
JavaScript
$('div').on('click', function(){
console.log( '$(this)', $(this) );
console.log( '$(event.target)', $(event.target) );
})