JSFiddle - React, Tailwind, and code Playground
HTML
<div class="modal-content">
<div class="modal-header">
// Header Content Here
</div>
<div class="modal-footer">
// Footer Content Here
</div>
<div class="modal-footer-after">
// Footer Content Here
</div>
</div>
JavaScript
var formhtml = $(".modal-content").clone()
//Find and remove your footer
.find('.modal-footer').remove();
//then return to last element set and get the html.
.end().html();
$('body').append("<br>" + formhtml);