Created
January 20, 2022 06:26
-
-
Save DylanCodeCabin/932071005b9b6c58f359aeaf042fa7de to your computer and use it in GitHub Desktop.
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
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