Reputation: 529
I have my HTML as this
<div class="content">
<section class="abc">
<input type="text"/>
<input type="text"/>
...
<input type="text"/>
</section>
<section class="abc">...</section>
<section class="abc">...</section>
<section class="abc">...</section>
<section class="abc">...</section>
<section class="abc">...</section>
</div>
From the above code i need to select each section by number (like 0th ,1st) all inputs which is having null values
How to write jquery select for this ?
Upvotes: 4
Views: 128
Reputation: 67207
Try,
$('.content .abc:nth-child(1) input:visible').filter(function(){ return $.trim(this.value) === ''; });
I just gave 2n
for a demonstration purpose, since your question was unclear, But you can frame that according to your need.
Upvotes: 2