Created
February 21, 2012 20:42
-
-
Save since1976/1878799 to your computer and use it in GitHub Desktop.
Show hide google map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('a.toggle').click(function() { | |
event.preventDefault(); | |
$("div.hide").slideToggle("fast"); | |
var $t = $(this); | |
var href = $t.attr('href'); | |
if(href == '#map') { | |
google.maps.event.addListener(map_canvas, 'resize', function() { | |
map_canvas.setCenter(map_bounds.getCenter()); | |
}); | |
google.maps.event.trigger(map_canvas, 'resize'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you use the slideToggle() callback function?