How do you iterate through a group of selected jQuery objects so that you can perform jQuery functions on each object individually?
<div class="foobar">abc</div> <div class="foobar">123</div> <div class="foobar">abc123</div>
I can select the group:
var foobarObjects = jQuery('.foobar')
But how would you go through each jQuery object in foobarObject and manipulate each one individually? I thought I could use jQuery().each
but that only allows me to work with DOM objects, not jQuery objects. I also tried a for loop in conjunction with the jQuery().eq(i)
function, but that seems to merge the items together.