JSFiddle - React, Tailwind, and code Playground
by bingjie2680
HTML
<div id="1" > This Is First Div </div>
<div id="2" > This Is Second Div </div>
<a href="#" id="click" >Click Here</a>
JavaScript
var id='1';
$('a').click(function(){
alert($('#'+id).text());
})