JSFiddle - React, Tailwind, and code Playground

HTML

<ul>
    <li>One</li>
    <li>Two</li>
    <li>Three</li>
    <li>Four</li>
</ul>

JavaScript

//I need to find the current position within the DOM

$('li').click(function(){
    alert($(this).index()); 
});