I am not very familiar with jquery-mobile, but I think 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 contents of the div with data-role="page"will be loaded onto the page.
Currently your scripts (especially those that initialize the map) are not inside this div, so they will not be loaded or executed.
source
share