JSFiddle - React, Tailwind, and code Playground
by Manoj kumar Lakshman
HTML
<div><a href="/">Logout</a><img src="http://placehold.it/350x150"/></div>
<div id="1" class="box"><img src="http://placehold.it/350x150"/></div>
<div id="2" class="box"><img src="http://placehold.it/350x150"/></div>
<div id="3" class="box"><img src="http://placehold.it/350x150"/></div>
CSS
img {
cursor:cross-hair;
}
JavaScript
$('img').on('click', function(e){
console.log('click:'+$(this).parent().html());
$(this).parent().html();
$(this).parent().css({"background-color":"red"});
return $(this).parent().attr('id');
});