问题
When using a Google Map on a page in http://jquerymobile.com; if one navigates away and then back to the map page all the markers end up at the top left corner.
Example:
The start of my jQuery JavaScript snippet:
$('.page-map').live('pageinit', function() {
...do stuff.
}
回答1:
Change 'pageinit' to 'pageshow':
$('.page-map').live('pageshow', function() {
...do stuff.
}
来源:https://stackoverflow.com/questions/9713930/why-do-my-markers-end-up-at-the-top-left-corner-if-i-navigate-back-via-ajax