javascript - Show div when google map is used -


i'm using google map api in rails app , show div jquery when using map.

the map contained in div id search_map_container tryed

$('#search_map_container').click(function() {     $('#my_div').show(); }); 

but fail. , fail .focus(), .focusin(), .mouseenter() or .change() events.

for putvande : html simple div :

<div id='my_div' style='display:none;'>     test </div> 

and google map html generate google :

<div class="search_map_container">    <div id="search_map" class="gmaps4rails_map" style="position: relative; background-color: rgb(229, 227, 223); overflow: hidden; -webkit-transform: translatez(0);"><div style="position: absolute; left: 0px; top: 0px; overflow: hidden; width: 100%; height: 100%; z-index: 0;">   ...   google map code   ...   </div> </div> 

for bharat soni : mean when click on google map or scroll or zoom.

your container try click on not have id 'search_map_container' class 'search_map_container'. should :

$('.search_map_container').click(function() {     $('#my_div').show(); }); 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -