I have 3 divs, each with a dfew input fields and next button on. I want to write a snippet of jQuery that when the next button is clicked it checks to ensure all input fiel
$('.next').click(function() { var emptyInputs = $(this).parent().find('input[type="text"]').filter(function() { return $(this).val() == ""; }); if (emptyInputs.length) { alert('Fail!'); } });