I need to get the ID of every div with a class and send it across to another PHP file. I would assume I need all of the ID's in one variable. The ID's will be put into a mysql query where I will find data that does not equal these ID's. How can this be done?
I have tried jQuery's each function but you cannot put all of the data from that function into one variable. At least not the way i did it.
This is what i've tried.
$('.newsItem').each(function(){
alert (this.id);
});
Thanks in advance.