1$('.check-fields').on('click', function () {
2
3 var reqlength = $('.required-entry').length;
4 console.log(reqlength);
5 var value = $('.required-entry').filter(function () {
6 return this.value != '';
7 });
8
9 if (value.length>=0 && (value.length !== reqlength)) {
10 alert('Please fill out all required fields.');
11 } else {
12 alert('Everything has a value.');
13 }
14});