Skip to content

Instantly share code, notes, and snippets.

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 wpflippercode/c7c59e5da3be436dc8970f35c37e9335 to your computer and use it in GitHub Desktop.
Save wpflippercode/c7c59e5da3be436dc8970f35c37e9335 to your computer and use it in GitHub Desktop.
Google Maps Fix for Tabby Responsive Tabs Plugin
add_action( 'wp_head','flippercode_maps_fix' );
function flippercode_maps_fix() {
?>
<script type="text/javascript">
jQuery(document).ready(function($){
$('body').on('click','.responsive-tabs__list__item',function(){
var id = $(this).attr('id');
if( id == 'tablist1-tab2') {
if(typeof map1 != 'undefined') {
$(map1).data('wpgmp_maps').resize_map();
}
}
});
});
</script>
<?php }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment