JSFiddle - React, Tailwind, and code Playground
HTML
<div id="header">
<div><a class="box blue" href="#">Blue</a></div>
<div><a class="box red" href="#">Red</a></div>
<div><a class="box green" href="#">Green</a></div>
</div>
CSS
#header { padding:20px; background:yellow; overflow:auto; }
.box { width:50px; height:50px; float:left; margin:0 20px 0 0; }
.blue { background:blue; }
.red { background:red; }
.green { background:green; }
a { color:white; display:block; text-align:center; }
JavaScript
$('#header').on('click', function() {
alert('header');
});
$('.box').on('click', function() {
alert($(this).attr('class'));
});