jquery - Select all elements after a certain element
I have a list similar to below and would like to only select all of the elements after the #everything_after
element.
<div id="container">
<div class="something"></div>
<div class="something"></div>
<div class="something"></div>
<div class="something"></div>
<div class="something"></div>
<div id="everything_after"></div>
<div class="something"></div>
<div class="something"></div>
<div class="something"></div>
<div class="something"></div>
<div class="something"></div>
</div>
Solution 1:
You can use nextAll to get the following divs.
Try:
$("#everything_after").nextAll();
Solution 2:
See: CSS3 General Siblings Selector
http://reference.sitepoint.com/css/generalsiblingselector
$("#everything_after ~ div")...