I have a google map embedded in my page whose visiblity is set to hidden. Using a button i want to show the map on the page. Should be done using jquery.
my code - (not working)
<divhidden";></div> Anyone can help me with the related jquery codes?
24 Answers
Try
$('#map').css('visibility','visible'); Actually, if style has display:none, you can use jquery function
$('#map').show(); 4Your tag is also incorrect. You should have this: visibility: hidden;
Try this:
<div;></div> $("#map").show(); $('div#map').css('visibility', 'visible')
But visibility:hidden is better than display:none if you want to use jQuery to hide it. Because jQuery's .show() function overlays some of the page elements like anchor tags, preventing click events.