JSFiddle - React, Tailwind, and code Playground

by jeremyblalock

HTML

<form method="post" action="http://www.nextbite.co" id="form">
    <input type="hidden" name="key1" value="value1" />
    <input type="hidden" name="key2" value="value2" />
</form>

<hr/>
<button id="btn">Submit Form</button>

JavaScript

function submitForm() {
    $('#form').submit();
}

$('#button').click(function() {
    window.setTimeout(submitForm, 1000);
});