JSFiddle - React, Tailwind, and code Playground
by 20yco
HTML
<div id="btnContainer">
<input type="button" class="btn" value="Button" /><input type="button" class="btn" value="Button" /></div>
CSS
.btn{
/* color: #000000;
font-size: 11px;
line-height: 1.2;
white-space:nowrap; */
}
JavaScript
$('#btnContainer').on('click', '.btn', function(){
var test = $('<input>', {
type: 'button', // Set type of input element
class: 'btn', // Applies class btn
value: 'Button', //sets value of Button
click: function () { }
});
$("#btnContainer").append(test);
});