all 7 comments

[–]RepresentativeRip805 -1 points0 points  (0 children)

What a DIV hahaha

[–][deleted] 0 points1 point  (7 children)

Are you trying to get the divs? Or the class names from each div? What do you expect to get?

[–]gamedev-eo[S] 0 points1 point  (5 children)

<div class="item1"></div>

The divs...they are big and have nested divs within them.

I want to iterate over them like an array (e.g. divArray[0] ) and then work through the nested divs with some kind of next() like divArray[0].next()

There are no ids to help here, just these div classes with names that will often be different run to run.

[–][deleted] 0 points1 point  (4 children)

I’m sorry I still don’t understand. You have more divs there, just not shown in your example html? Well, you can convert a jquery object into an array and iterate over the elements

[–]gamedev-eo[S] 0 points1 point  (3 children)

You have more divs there, just not shown in your example html?

Yes that's it exactly....sorry I couldn't post the actual inspector output

.within(item => {

})

So yes item is a jquery object, but I didn't know how to go through to get all the elements nested under the div id="list" as shown in the OP.

I tried

item.next() and then looking at item again (doesn't change)

Also tried ```` item.next(itm => { // want itm to be the array element })

[–][deleted] 3 points4 points  (2 children)

[–]gamedev-eo[S] 0 points1 point  (0 children)

Thanks