JSFiddle - React, Tailwind, and code Playground

by Ajay Patel

HTML

<div id="btnContainer"><input type="button" class="btn" value="Button"/></div>

CSS

.btn{
    color: #000000;
    font-size: 11px;
    line-height: 1.2;
    /*padding: 3px 10px;
    margin: 5px 10px;*/
    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);    

});