views:

22

answers:

2

i must check all :file fields, all fields must be not empty. i use code

function CheckFiles() { var t = $('.uploadElement:empty').size(); alert(t); }

but t return all uploadElement elements count. how to get empty :file fields?

sorry my english

+1  A: 

this should return all empty file inputs

$('input:file[value=""]')

or

$(':[value=""].uploadElement')
used2could
used2could, thank u very much!
Glad to help :) good luck!
used2could
Does this answer your question? if so please select it as the answer
used2could
A: 
$('input.uploadElement:file').is(":empty");
Machiel
`:empty` means it has no child elements, which is always true :)
Nick Craver