Daedalon
Member
Posted 5 months ago #
We've gotten complaints from irritated users who scroll the page using mouse wheel and end up having their map zoomed instead. http://stackoverflow.com/a/2330272 shows how to fix this with a Google Maps setting.
- Could this be implemented in plugin core? Either as always-disabled or as a setting.
- While waiting for the possible core support, is there a way to implement this in our customizations?
http://wordpress.org/extend/plugins/events-manager/
agelonwl
Member
Posted 5 months ago #
hi,
try this snippet in your theme header.php (below wp_head)
<script type="text/javascript">
jQuery(document).ready(function($){
jQuery(document).bind('em_maps_location_hook', function( e, map, infowindow, marker ){
map.scrollwheel = false;
});
});
</script>
Daedalon
Member
Posted 5 months ago #
That worked, thanks! To be exact, I added this part to our custom .js file inside the main document.ready function:
$(document).bind('em_maps_location_hook', function( e, map, infowindow, marker ){
map.scrollwheel = false;
});
Daedalon
Member
Posted 2 months ago #
This does not affect the map on Add / Edit Event / Location pages. How can I disable mouse wheel scroll zoom on those pages?