JSFiddle - React, Tailwind, and code Playground
HTML
<div id="emailSection">
<ul>
<li>Email(s) to send notice to.</li>
<li><input type="email" name="emails[]" /><a href="#" class="remove_field">Remove</a></li>
<li><a class="add_email_button ui-button" href="#" >Add Another Email</a></li>
</ul>
</div>
JavaScript
$(document).ready(
function() {
$('.remove_field').on("click", function (e) {
e.preventDefault();
$(this).parent('div').remove();
});
$('.add_email_button').on('click', function (e) {
e.preventDefault();
var html = '<li><input type="email" name="emails[]" /><a href="#" class="remove_field">Remove</a></li>';
$(html).insertBefore( $(this) );
});
}
);