Created
February 15, 2018 14:43
-
-
Save andrasguseo/72f9bcbd7215eec575091bedf55e2de6 to your computer and use it in GitHub Desktop.
Tribe, sample snippet showing how to change Google Map attributes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Tribe, sample snippet showing how to change Google Map attributes */ | |
function tribe_custom_map_js() { | |
// bail if not map view | |
if ( !function_exists( 'tribe_is_map' ) || !tribe_is_map() ) return; | |
// if we are in map view let's print the JS snippet | |
?> | |
<script type="text/javascript" > | |
jQuery(document).ready( function ($) { | |
if ( $('#tribe-geo-map').length ) { | |
tribe_ev.geoloc.map.set('scrollwheel',false); | |
} | |
}); | |
</script> | |
<?php | |
} | |
add_action('wp_head', 'tribe_custom_map_js'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment