JSFiddle - React, Tailwind, and code Playground

by Superman

HTML

<ul>
  <li>one</li>
  <li>two</li>
  <li>three</li>
</ul>

JavaScript

$("li").click(function() {

  $(this).parent().prepend($(this));

});