I have repeating div's down a page. I need to select the outerbox ID's and text element
<div class="outerbox" id="12345">
<div class="headerbox" id="title12345">
<div class="text"> </div>
<h2>Foo Bar
</h2>
</div>
I need to create a multi-dimensional array using jquery
I have it this far with creating a single array for the outerbox ID's
var boxids = $('.outerbox').map(function() { return this.id; }).get();
var boxidsLength = boxids.length;
var i = 0; i < boxidsLength; i++) {
alert (boxids[i])
}
But I'm having difficulty wrapping my head around the process of how 1) I'd create a multi-dimensional array from this input and how to 2) select the element under class 'text'
The array would look like
Foo Bar | Bar Foo
12345 | 67890
etc
Thank you
[[]]
of required array ? Not certain about description of result at "The array would look like"Foo Bar | Bar Foo
12345 | 67890
?[id, text]
? Thanks