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(){
     // this does not work
    console.log($(this).get());
    
// Will get index
    console.log($(this).index());
    // this does, but I won't know which is clicked
    console.log($('li').get(3)); 
});