JSFiddle - React, Tailwind, and code Playground

by Shaunak Deshpande

HTML

<div id="container"> <div>
    
<button id="append">Append</button>

JavaScript

$('#append').click(function(){
    $('#container').append('<input type="button" id="b1" value="Button1" /><input type="button" id="b2" value="Button2" /><input type="button" id="b3" value="Button3" />');
    
    $('#b1').click(function(){
        alert('button 1 clicked');
    });
});