[Solved] Why is my click function not working as expected?
On this line: .on(‘click’, fill_info_window(data, i)); …you’re calling the fill_info_window function, not just referring to it. You want to do something like this: .on(‘click’, function() { fill_info_window(data, i); }); unless you’re in a loop (that i variable makes me think maybe you are). If you are, then: .on(‘click’, makeHandler(data, i)); …where makeHandler looks like this: … Read more