Google Maps listener only firing once?
-
29-10-2019 - |
Question
Hello so basically what I wanted was so when you clicked a marker, it fired of some jQuery that would replace a div's contents. Works perfectly the first time, but afterwards it won't respond. Any suggestions? Thanks!
google.maps.event.addListener(marker, 'click', function() {
$('.address').replaceWith(" + '"' + $arrayOfEventNames[i] + '"' + ");
Note: This is using embedded ruby code to get the "event name" I want. So this is inside a puts statement. hence the need of the quotes.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow