How can i select only the first child of a particular class of a parent with a particular class for the purposes of clone()
?
<div class=sector_order>
<div class=line_item_wrapper>
SELECT THIS DIV
</div>
<div class=line_item_wrapper>
NOT THIS DIV
</div>
</div>
I am trying like this:
var form1 = $(this)
.parents('.sector_order')
.children('.line_item_wrapper')
.children().clone(true)
and get both inner divs with the class line_item_wrapper
, but I get an empty object when I try with this addition:
children('.line_item_wrapper :first')
Thanks!