JSFiddle - React, Tailwind, and code Playground

HTML

<input id="hii" type="text" />
<a href="#" id="hi">Click here to validate</a>

JavaScript

$("#hii").on('click', function() {
  alert('hi' );
})