Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The <a href="http://jquerymobile.com/demos/1.1.0/docs/pages/page-scripting.html" rel="nofollow">documentation</a> for how to handle the pageinit event is slightly different than your approach -- at least the section of the documentation I was looking at. Their suggestion is that you would code it like this:</p> <pre><code>$( document ).delegate("#geoPage", "pageinit", function() { // Handle it } </code></pre> <p>The documentation sounded like you have placed your function in the best location if you want to bind this way.</p> <p><strong>Edit</strong>:</p> <p>Notably, <a href="http://jquerymobile.com/demos/1.1.0/docs/api/events.html" rel="nofollow">this particular page</a> describes binding exactly as you have shown (but adds <code>event</code> into the anonymous function which I don't think should affect your situation). This leads me to believe that you might have a javascript error in your Developer Tools Console when you navigate from another page and the page gives off an appearance of 'not working'. Be sure to check for that in your Developer Tool of choice.</p> <p><strong>Edit</strong>:</p> <p>The solution for you is that you need to include your google maps javascript 'include' somewhere within the <code>data-role='page'</code> element. Jquerymobile is going to ignore everything outside of that every time it does an AJAX page load. Alternatively, you could turn all links into this page into <code>data-ajax="false"</code>.</p> <p>Include the following line <em>inside</em> of your data-role="page" or include it in the html <code>&lt;head&gt;</code> for every page.</p> <pre><code>&lt;script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"&gt;&lt;/script&gt; </code></pre> <p>Be sure to really read and let the original link sink in. Best practice is that you have the same <code>&lt;head&gt;</code> element for every page and include it rather than copy-paste it.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload