JSFiddle - React, Tailwind, and code Playground

by jamesking

HTML

<form action="index.html" method="post">
    <input type="submit" value="Submit me!" />
</form>

CSS

body {
    font-family: sans-serif;
    color: #fff;
    text-align: center;
}

input {
    border: none;
    padding: 20px;
    font-size: 20px;
    background: #036;
    color: #fff;
}

JavaScript

$('form').on('submit', function() {
    $(this).find('input').css('background', '#c00');
});