i have a number of divs with the class="mydiv"
each of these divs also has an attribute id which is set to a number
i want to basically say (pseudo code)
select all divs with class = "myDiv"
loop through them and get the id attribute
combine all ids into a list and return an array of these integers
is this the best way of doing that?
var ids = new Array();
$(".myDiv").each(function (i) {
var id = $(this).attr('id');
ids[i] = id;
});