Reputation: 252
What jQuery function would I use to grab the closest to the top of a div <span>
and also the very last in the list as well?
Upvotes: 0
Views: 1943
Reputation: 57278
The HTML
<div id="spans">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
the jQuery:
$('#spans span:first,#spans span:last');
Your question requires more explanation but this is a punt at what your looking for.
Upvotes: 7