JSFiddle - React, Tailwind, and code Playground
HTML
<ul>
<li>List Item
<p>Paragraph, inside the list item</p>
<span>Span, inside the list item</span>
</li>
</ul>
JavaScript
$('li').on('click', function(e) {
if (this === e.target) {
alert('li was clicked!');
}
});