1
I need to make a each with several items, example:
How can I do that? The "item" already generates the result of the "data.id_site" array but I need a new array together, the "item2" that generates the result of the "data.name" array".
It would be something like:
$.each(data.id_site, data.name, function(i, item, item2) {
$(".lado").append("<div id='site-" + item + "'>" + item2 + "</div>");
});
Can you explain the question better? Can you give an example of what the
data
and the result you hope to achieve?– Sergio
I changed the question, I need a each with more than 1 array, that’s it!
– Alan PS
So you want something like
$(".lado").append("<div id='site-" + item + "'>" + name + "</div>");
that’s it?– Sergio
Yes!!!!!!!!!!!!!
– Alan PS