Get child elements from a parent but not first and last
Posted
by
Cleiton
on Stack Overflow
See other posts from Stack Overflow
or by Cleiton
Published on 2010-12-28T17:24:16Z
Indexed on
2010/12/28
17:53 UTC
Read the original article
Hit count: 164
JavaScript
|jQuery
I would like to know how could I write a jQuery selector that get all children from a parent element except first and last child?
Example of my current HTML:
<div id="parent">
<div>first child( i don't want to get)</div>
<div>another child</div>
<div>another child</div>
<div>another child</div>
(...)
<div>another child</div>
<div>another child</div>
<div>last child (i dont want to get neither)</div>
</div>
© Stack Overflow or respective owner