Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Change page is what your looking for. Load page just loads it into dom so you can manipulate before you actually show the page. </p> <p>When binding to page init make sure your binding your pageinit event using a unique id. They cannot both have id="#index". Also make sure you bind page init to each page. Your code would only have the pageinit firing for just the #index page and not the teamliquid.html.</p> <p>Use the following in the <code>&lt;head&gt;&lt;/head&gt;</code> of your documents:</p> <pre><code>$(document).on('pageinit','#index', function(){ $('#rssFeed').rssfeed('http://feeds.reuters.com/reuters/oddlyEnoughNews', { limit: 10, date: false, }); }); $(document).on('pageinit','#otherpage', function(){ ... This would be for the other page you are referring to.... }); $(document).on('swipeleft','#index', function(){ $.mobile.changePage("teamliquid.html", { transition: "slide" }); }); $(document).on('swiperight','#otherpage', function(){ $.mobile.changePage("index.html", { transition: "slide" }); }); </code></pre> <p>or to get pageinit for fire for every page</p> <pre><code>$(document).on('pageinit','[data-role=page]', function(){ ....ground breaking code... }); </code></pre> <p>As of jquery 1.7 bind, live, and delegate all use the .on() method. It is the recommended way of binding your pageinit for JQM. You can also do cool things like replacing '#index' with '[data-role=page]' to make your code fire on every page. Here is a JSfiddle demonstrating that this indeed did work. <a href="http://jsfiddle.net/codaniel/cEWpy/2/" rel="noreferrer">http://jsfiddle.net/codaniel/cEWpy/2/</a></p>
 

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