How can i get this function out of the i iteration loop, since jshint gives me an error.
for (i = 0; i < portfolios.length; i++) {
return function () {
for (h = 0; h < markers.length; h++) {
markers[h].infobox.close();
}
markers[i].infobox.open(map, this);
};
})(marker, i));
}
}
thanks!