Home › Forums › MapPress Support › Event Documentation › Reply To: Event Documentation
January 24, 2022 at 10:17 am
#19362
Hi Chris,
Thanks for the getting back to me. I ended up getting it to work by just adding my own click event listener to the markers themselves.
$('.leaflet-marker-pane').on('click','.leaflet-data-marker', markerClicked );
function markerClicked(){
// set delay to allow selector to be updated
setTimeout( function (){
var item = document.querySelector('.mapp-item.mapp-selected');
scrollInnerIntoView( item );
}, 50);
}