JSFiddle - React, Tailwind, and code Playground
by Gunnar
HTML
<form id="form" method="POST" action="/echo/html/">
<input name="field" type="text">
<button id="btn">submit</button>
</form>
<div id="popUpDiv" style="display:none">Hello World
<br/>
<div id="result">result...</div>
</div>
JavaScript
$('#btn').click(function (e) {
e.preventDefault();
$.post('/echo/html/', $(this).serialize(), function (response) {
$('#result').html("test");
$('#popUpDiv').fadeIn();
});
});