Hi Feijó,
you could try this ...
$('div.main > div.sub:eq(2)').after('<div class="sub"></div>');
That should insert your new div after the 3rd one.
--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Feb 11, 2008, at 2:25 PM, Feijó wrote:
consider that html:
<div class=main>
<div class=sub></div>
<div class=sub></div>
<div class=sub></div>
<div class=sub></div>
<div class=sub></div>
</div>
I need to append a new <div class=sub></div> as the 2nd, 3rd,
middle, etc.
Append() add after the last one.
How can I do that? Its possible?
Thanks
Feijó