Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Follow the example I created for you four days ago ( <a href="https://stackoverflow.com/questions/7690303/using-iscroll-with-jquery-mobile/7690502#7690502">using iscroll with jquery mobile</a> )... You are binding to an event that only fires on the initial page load and you want to bind to a jQuery Mobile event that fires whenever a new page is added to the DOM.</p> <p>Change:</p> <pre><code>var myScroll; document.addEventListener('DOMContentLoaded', loaded, false); </code></pre> <p>To:</p> <pre><code>var myScroll = []; $(document).delegate('[data-role="page"]', 'pagecreate', function () { myScroll[this.id] = new iScroll(this.id + '_wrapper', { snap: true, momentum: false, hScrollbar: false }); }); </code></pre> <p>Which will require renaming the <code>wrapper</code> div on each page to _wrapper. Which is necessary anyway because each element with an ID needs a unique ID in the DOM.</p> <p>Link: <a href="https://stackoverflow.com/questions/7690303/using-iscroll-with-jquery-mobile/7690502#7690502">using iscroll with jquery mobile</a></p> <p><strong>--UPDATE--</strong></p> <p>I have created an example of using iScroll carousels on multiple pages. Notice how I include the custom JavaScript and CSS on each page so if the user refreshes the page (on any page) they will not receive any errors because of missing code.</p> <p>Here is the link to the working example: <a href="http://apexeleven.com/stackoverflow/iScroll/default.html" rel="nofollow noreferrer">http://apexeleven.com/stackoverflow/iScroll/default.html</a></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. 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.
    3. 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