JSFiddle - React, Tailwind, and code Playground
by Daniel Redwood
HTML
<div id="page">
<input id="a" class="answer" type="text" placeholder="test me">
<a id="theOne" href="#submit">CZECH IT</a>
</div>
<form id="postitron" method="post" action="/postitron/answertron.php">
<input id="af" type="text" name="a">
<input id="submit" type="submit" value="check em">
</form>
CSS
#a {
margin:0 0 1em 0;
}
#page {
background:#ccc;
}
JavaScript
$('.answer').bind('keypress, blur', function(){
var name = $(this).attr('id'),
field = $('#' + name + 'f');
field.val($(this).val());
});
$('#theOne').click(function(e){
e.preventDefault();
$('#page').animate({opacity:0},400, function(){
$('#submit').click();
});
});