JSFiddle - React, Tailwind, and code Playground

by Sedbol

HTML

<ul>
    <li>Foo</li>
  
</ul>

CSS

li {
    height: 60px;
}
li:nth-child(2n) {
    background-color: #ddd;
}

JavaScript

// Here is some code to tell us which element has been clicked
$('ul').on('click', 'li', function() {
    alert('You clicked: ' + $(this).text());
});

function simulateClick(x, y) {
    jQuery(document.elementFromPoint(x, y)).click();
}
simulateClick(100, 30);