JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://malsup.github.io/jquery.form.js"></script>
<div id="post_output_1" class="output">
<form id="form_1" action="/echo/html/" method="post">
<input id="age" type="text" name="age" />
<input id="submit" type="submit" name="submit1" value="submit 1"/>
</form>
</div>
<div id="post_output_2"class="output">
<form id="form_2" action="/echo/html/" method="post">
<input id="age" type="text" name="age" />
<input id="submit" type="submit" name="submit2" value="submit 2"/>
</form>
</div>
JavaScript
$(".output").each(function (index, value) {
var that = this;
$(that).ajaxForm(function (data) {
console.log(this);
$(that).html(data);
});
});