I am working with GoogleMaps and Bootstrap API.

What I want to do is add a button that when clicked hides a given the layer and displays a new one, I have been trying it with jQuery, but the problem is I can’t hide the layer from the button .click() event.
//Javascript #indicacionmapa confirmation button
infowindow.setContent('<a href="#" class="btn btn-success btn-large" id="btnconfirmaubica"> Esta es la ubicación ✓ </a>');
//Jquery
$(document).load(function() {
$("#btnconfirmaubica").click(function () {
$("#segundopaso").slideUp("slow");
$("#primerpaso").slideDown("slow");
});
});
I hope you can help
change:
with:
also for dynamically generated elements you should delegate the event, try the following: