Skip to content

Instantly share code, notes, and snippets.

@andrasguseo
Created February 15, 2018 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrasguseo/72f9bcbd7215eec575091bedf55e2de6 to your computer and use it in GitHub Desktop.
Save andrasguseo/72f9bcbd7215eec575091bedf55e2de6 to your computer and use it in GitHub Desktop.
Tribe, sample snippet showing how to change Google Map attributes
<?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