How to Disable Zoom in Advanced Maps on Single Listings
Place this code in your active theme's functions.php
function disable_single_map_zoom() { ?>
<script>
jQuery(document).ready(function($) {
//disable advanced map zoom on single listing
setTimeout(function() {
if($('#epl_adv_tab_map_sat').length > 0){
mapsat.setOptions({
scrollwheel : false,
});
}
if($('#epl_adv_tab_map_street').length > 0){
mapstreet.setOptions({
scrollwheel : false,
});
}
if($('#epl_adv_tab_map_transit').length > 0){
maptransit.setOptions({
scrollwheel : false,
});
}
if($('#epl_adv_tab_map_bike').length > 0){
mapbike.setOptions({
scrollwheel : false,
});
}
if($('#epl_adv_tab_map_comparables').length > 0){
comparablesmap.setOptions({
scrollwheel : false,
});
}
}, 300);
} );
</script> <?php
}
add_action('wp_footer','disable_single_map_zoom');