The user should be able to click on a link which will open a modal with a map inside. Everything works fine but when you close the modal and click on the link again the modal opens but the map doesn’t load again.
This is the jQuery that opens the modal when the link is clicked.
$('.mapModal').click(function(){
var id = $(this).attr('value');
var address = $('#doc' + id).data('ad');
$("#map-modal").show();
$("#modal-map").goMap({
address: '' + address + ', South Africa',
zoom: 20
});
$.goMap.createMarker({
address: '' + address + ', South Africa'
});
});
$('.close').click(function(){
$("#modal-map").html('');
});
You need to delete data(), so simply
After $(“#map-modal”).show(); write
and you can lunch it again.