views:

92

answers:

2

Is there a way I can use a jQuery pseudo selector like :empty or :not(:checked) on an input/textarea/select element, or any other way I can return an object that is empty?

+2  A: 

I'm not entirely clear, but I think you're looking for input controls that have no value entered by the user? There's no explicit pseudo-selector/filter for that, but...

You can build a custom filter by using the .filter() function on your result set. Try something like:

$("input").filter(function (){
    return $(this).val() == '';
});
womp
A: 

Not tested it but this should work too

$('input[value=""], select[option=""]')

as selector.

asrijaal