Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8243389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:30:11+00:00 2026-06-07T21:30:11+00:00

Given this scenario in jQuery Mobile ; two pages with a button on the

  • 0

Given this scenario in jQuery Mobile; two pages with a button on the first page which opens a second page with a list view, I am wanting to prevent the re-initialization of the listview happening every time page two is shown.

<body>
    <div data-role="page" data-theme="c" id="page1">
    <div data-role="content">
        <a id="page1button" href="#page2" data-transition="none" data-role="button">Select an item</a>
        </div>
    </div>
    <div data-role="page" id="page2" data-dom-cache="true">
        <div data-role="content">
            <ul data-role="listview" data-theme="c" data-filter="true">
                <li data-icon="false"><a href="#page1">ABC</a></li>
                <li data-icon="false"><a href="#page1">BCD</a></li>
                <li data-icon="false"><a href="#page1">CDE</a></li>
                <li data-icon="false"><a href="#page1">DEF</a></li>
            </ul>
        </div>
    </div>
</body>

This sample code just shows 4 items in the list view (for the sake of keeping the code short), but my problem can be better illustrated if there are more items in the listview, enough items that will cause the listview to have a scrollbar.

So, for example, on an iPad, if the listview has 80 items, then you will notice that if you are on the second page and you scroll down to the bottom and select an item at the bottom of the list, jQuery Mobile scrolls back to page 1. So far, no problem. But when you click the button to go back to page 2, then the listview is reinitialized and is scrolled to the top again. This is what I am wanting to prevent happening; I am wanting to be able to go to page 1 and then back to page 2 with the listview being in an identical state to how I left it.

So I want the listview initialized only once and not everytime the page is shown. Does anyone know in which event this listview initialization is happening? Is it possible to disable this action?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T21:30:14+00:00Added an answer on June 7, 2026 at 9:30 pm

    jQuery Mobile doesn’t preserve scroll position between pages. You should be able to trap the some of the page navigation events and preserve it, though; when you do restore it, you can use silentScroll to restore the position without triggering many of the events you don’t want to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given this scenario where you have transfer objects (POJO's with just getters/setters) which are
The following scenario is given: /Collection1 (a number of users are subscribed to this
Given this method to work on a HTML page in a webbrowser: bool semaphoreForDocCompletedEvent;
Given this code: List<Integer> ints = new ArrayList<Integer>(); // Type mismatch: // cannot convert
Given this JavaScript code (which is just a comment referring to a url): //
Capybara's Selenium driver won't click on JQuery Mobile formatted buttons. It thinks the button
What would be the best regular expression for this scenario? Given this URL: http://php.net/manual/en/function.preg-match.php
I have scenario like this Given /^initial data$/ do |table| @schedule_05 = Factory.build :schedule_05
Given this plain JavaScript construct: var MyObject = function() { var privateArray = [
Given this CSS body { font-size: 62.5%; font-family: Arial,sans-serif; line-height: 2em; color:#333 } .post_text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.