diff --git a/static/scripts/search.js b/static/scripts/search.js index f7324b8..b6dda52 100644 --- a/static/scripts/search.js +++ b/static/scripts/search.js @@ -55,9 +55,10 @@ $('iframe').attr('src', $('iframe').attr('src')); } }); - $('#mapTab').on('shown', function(e) { - google.maps.event.trigger(window.map, 'resize'); - alert('done'); + $('.nav-tabs a').on('shown.bs.tab', function (e) { + if ($(e.target).attr('href') === '#mapTab') { + google.maps.event.trigger(window.map, 'resize'); + } }); window.accessReview = function(id) {