JSFiddle - React, Tailwind, and code Playground

by sergey1986

HTML

<input id="1" type="button" value="one">
<input id="2" type="button" value="two">
<input id="3" type="button" value="three">

JavaScript

for(var i=1; i<=3; i++){
   $('#' + i).live('click', function(){
       alert(i);
   });
};