Skip to content

Instantly share code, notes, and snippets.

@DylanCodeCabin
Created January 20, 2022 06:26
Show Gist options
  • Save DylanCodeCabin/932071005b9b6c58f359aeaf042fa7de to your computer and use it in GitHub Desktop.
Save DylanCodeCabin/932071005b9b6c58f359aeaf042fa7de to your computer and use it in GitHub Desktop.
jQuery(function($){
let bouncingMark = false;
$(document.body).on('mouseenter', '.wpgmaps_mlist_row', function(){
const map = WPGMZA.maps[0];
const markerId = $(this).attr('mid');
if(markerId){
if(bouncingMark !== markerId){
if(bouncingMark){
map.getMarkerByID(parseInt(bouncingMark)).setAnimation('0');
}
map.getMarkerByID(parseInt(markerId)).setAnimation('1');
bouncingMark = markerId;
}
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment