JSFiddle - React, Tailwind, and code Playground

by f0t0n

HTML

<div id="fields_holder">
    <button class="add_file">Add File</button>
</div>

JavaScript

var $j = jQuery.noConflict();


$j('#fields_holder').on('click', '.add_file', function() {
     $j('#fields_holder').append('<button class="add_file">Add File</button>');
});


/*
$j(document).on('click', '#fields_holder .add_file', function() {
     $j('#fields_holder').append('<button class="add_file">Add File</button>');
});
*/