Skip to content

Instantly share code, notes, and snippets.

@xkid
Created January 30, 2016 03:46
2016 Update jQuery plugin for creating Google Maps from semantic markup
$(document).on('click', location_link_selector ,function(e){
e.preventDefault();
var marker_index = parseInt($(this).attr('href').split('#')[1], 10);
google.maps.event.trigger(gmarkers[marker_index], "click");
});
$(location_link_selector).live('click' ,function(e){
e.preventDefault();
var marker_index = parseInt($(this).attr('href').split('#')[1], 10);
google.maps.event.trigger(gmarkers[marker_index], "click");
});
@tiloru
Copy link

tiloru commented Mar 18, 2022

This works. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment