I have tried a couple of solutions from previous questions, but no luck. Hoping someone can help me out.
I have a section of a form where fields are dynamically crea
This will give you all empty inputs:
$('.user_field').filter(function(){
return !$(this).val();
}).length;
$('.user_field').blur(function(){
alert ($('.user_field').filter('[value=""]').length);
});
DEMO
mm just posting my version using .not
$('.user_field').blur(function() {
var count = $('.user_field').not(function() {
return this.value;
}).length;
alert(count);
});
DEMO