how do I use jquery to select the first and last item divs in the following snippet and apply a different additional class to each:
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
These will be somewhere on a web page. Thank you.
Doesn’t get much easier than:
You can also do it in a single command, if you want to save a few cycles: