With jQuery how do I count how many fields of my array field[] are not empty ?
Sample of the input field
<input type="file" name="arquivo[]" id="arquivo">
I was trying to make something up using map and get but it is not coming along well:
var total = 0;
var count = $('#arquivo[value!=""]').map(function() { total = total+1; }).get();
But no matter how many fields I have filled it always end up with the value of 1 and if I have no fields filled 0.