From 081555db69a1d59d9e6ca2a3e96db970500b99c5 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Tue, 22 Sep 2015 14:13:12 +0900 Subject: [PATCH] Fixing map display --- static/scripts/search.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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) {