How to check if all inputs are not empty with jQuery -
i need validate form jquery. can check inputs 1 one, it's not practical solution.
how can check if inputs non-empty more efficiently? in form can have input
elements of different types: text, several groups of radio, select etc.
just use:
$("input:empty").length == 0;
if it's zero, none empty.
to bit smarter though , filter out items spaces in, do:
$("input").filter(function () { return $.trim($(this).val()).length == 0 }).length == 0;