问题
i gave link page with google maps when i clicked map link it opens page but does not initialize google maps.But when i refresh page it initialize page you can click map link in the footer
it will open that page but without initialize google maps but if you refresh page it will initialize what should i do to find problem?
回答1:
I'm not very familiar with jquery-mobile, but I guess that when a page is loaded via AJAX(and the page will be loaded via AJAX in this case, when you click the button), only the content of the div with data-role="page" will be loaded into the page.
Your scripts(especially the one that initializes the map) currently are not located inside this div, therefore they will not be loaded or executed.
来源:https://stackoverflow.com/questions/15752264/google-maps-does-not-initialize-first-time