Closed lwrubel closed 3 years ago
Currently, the check whether a user has put search criteria in a textarea input is using .val() and therefore only checking the first textarea.
.val()
Instead of !$('textarea').val() should use .filter():
!$('textarea').val()
$('textarea').filter(function() { return this.value === ''; }).length === 10
to confirm that all 10 textarea inputs are empty.
Currently, the check whether a user has put search criteria in a textarea input is using
.val()
and therefore only checking the first textarea.Instead of
!$('textarea').val()
should use .filter():$('textarea').filter(function() { return this.value === ''; }).length === 10
to confirm that all 10 textarea inputs are empty.