Disable mouse scroll wheel scaling with google maps v3 while in infoindust
I'm trying to disable mouse wheel scaling on my maps, but it doesn't seem to work (although I'm sure it worked, maybe something changed).
Anyway, I have those custom info windows that pop up when users click on the map markers, and sometimes they have a fair amount of content in which a scrollbar appears in them. I want to make sure that when people scroll, the contents of the infowindow scrolls and that the map stays the same.
My code (coffeescript):
# Disable map Dragging when cursor enters infoBox div
$(document).on "mouseenter", ".infobox-content", () ->
googleMap.setOptions( {draggable:false, scrollwheel:false} )
$(document).on "mouseleave", ".infobox-content", () ->
googleMap.setOptions( {draggable:true, scrollwheel:true} )
I made sure that events were fired when appropriate and that events were set up correctly, but it still doesn't work.
Other similar questions that tell me to do exactly what I am doing:
+3
source to share
2 answers