JSFiddle - React, Tailwind, and code Playground

HTML

<div id="one" class="btn">
  Click here for 1
</div>
<div id="two" class="btn">
  Click Here for 2
</div>
<div id="three" class="btn">
  Click Here for 3
</div>

CSS

.btn{width:100px;height:100px;border:2px solid red;color:blue;float:left;cursor:pointer;margin-left:15px;text-align:center;}

JavaScript

$('.btn').on('click',function(){
      window[this.id]();  //here I want to run function
        
});
one = function(){alert("one clicked")}
two = function(){alert("two clicked")}
three = function(){alert("three clicked")}