I have an infowindow that pops up when a google maps marker is clicked. All of the content is enclosed in quotes including buttons and dropdowns and set using infowindow.setcontent();
I'm having some issues on mobile with multiple things firing(such as the selection dropdown) when buttons are tapped. This isn't an issue on PC. I've done some research and it seems the jquery method stopPropagation() would help me, however I'm stuck on how to access the button because it's enclosed in quotes. Nothing happens when I press the button. Here's what I'm trying currently. This does work for buttons that aren't in quotes.
$(document).ready(function(){
$("#button2").click(function(event){
event.stopPropagation();
alert('test');
//method to be executed
});
});
the button
var content ='<input type="button" id="button2"value="Mark checked">';