JSFiddle - React, Tailwind, and code Playground
by Ben Bankes
HTML
<div id="academic">
<div class="uniqueWrapper">
<div>
<input name="myInput[]" />
</div>
<div>
<input name="myOtherInput[]" />
</div>
<button class="add">+</button>
<button class="remove">-</button>
</div>
</div>
JavaScript
$(document).on('click', '.add', function () {
var form = $(this).parents('.uniqueWrapper').eq(0);
var formClone = form.clone();
form.after(formClone);
});
$(document).on('click', '.remove', function () {
$(this).parents('.uniqueWrapper').eq(0).remove();
});