I'm trying to pass arguments inside google.maps.event.addListener
I know I can do it like this
google.maps.event.addListener(marker, 'mouseover', function() {
callback(param1, param2);
});
but since I'm declaring markers inside a loop, I'm getting linting errors :
Dont make functions within a loop
I tried adding them like this:
google.maps.event.addListener(country, 'mouseover', toggleOpacity, param1, param2);
but it's not working ..
Anyone knows how I can pass arguments without making use of a second function ?