Tags

, ,

Google Map scrolling zoom on click

many of you facing the issue of google mouse scrolling zoom
while someone scrolling site to view and google map stop user to scroll down to site because of google map mouse scroll zooming

here is the simple trick to do the magic

i am using pointer-events

pointer-events

simply add this script to your site

$('iframe').css("pointer-events", "none");

$('address').click(function () {
  $('address iframe').css("pointer-events", "auto");
});

$( "address" ).mouseleave(function() {
  $('address iframe').css("pointer-events", "none");
});

Working Example

Advertisements