JSFiddle - React, Tailwind, and code Playground

by rpflorence

HTML

<form id="myForm">
    <input type="text" /><br/>
    <input type="text" /><br/>
    <input type="text" /><br/>
    <input type="submit" />
</form>

JavaScript

$('#myForm').submit(function(){
    $('#myForm input[type=text]').each(function(index, item){
        if(item.value == '') alert('fill it in, sucker');
    });
    return false;
});