I'm trying to create dialogs in jQuery Mobile that appear when you click on a Google Maps marker.
Sample URL: http://cyclestreets.darkgreener.com/location/ (scroll to a London, UK location to see markers).
I've got part of the way there, with this code:
google.maps.event.addListener(map_marker, 'click', function() {
$.mobile.changePage({ url: $("#photo"), data: "id=" + marker.id, type: "GET"}, 'pop', false, true);
});
But, a few issues to do with styling and data:
.live()
event, how can I pick up the data that I have passed to it?function openPopup(element_id)
{
$.mobile.changePage(element_id, { transition: "pop", role: "dialog", reverse: false } );
}
Since beta 1, to get a div
to appear as a dialog, use the data-role="dialog"
attribute on the div
instead of data-role="page"
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With