$.ajax with $.each
$.ajax with $.each
I have several divs equal with different values and I'm trying to get all the id like this:
$(".compartilhamento").each(function(){
var compartilhamentos_id4 = $(this).attr("id");
var compartilhamentos_id3 = compartilhamentos_id4.split("_");
var compartilhamentos_id2 = compartilhamentos_id3[2];
});
and now I have all the ids in a var.. I use this var and sends it to a php file.. how i do it ?
$.ajax({
url: "ajax/load.php",
type: "post",
dataType: "json",
cache: false,
data:
{
compartilhamentos_id2: compartilhamentos_id2
});
Topic Participants
emp_shad
peter.aganyo