I have a whole bunch of divs that have a class called ofint. Each of them may have additional classes. I'd like to store this information about each div and then print them.
So I'm trying to loop through all divs of class ofint and store the div id and its classes in an array. The idea is that I'll search the array later, but for now I need to create it and make sure it's storing the right information.
I have some idea how to get there, but can't quite do it. How do I complete this and then print the array for double checking purposes?
var myarr = new array;
$(".ofint").each(function(){
//store the div id and div classes in the array
myarr[this.id][classes] = //the list of classes;
});
//print the array here