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 6222101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:15:19+00:00 2026-05-24T08:15:19+00:00

With jQuery mobile I’m using a dynamic ‘page’ template with custom content inserted depending

  • 0

With jQuery mobile I’m using a dynamic ‘page’ template with custom content inserted depending on user input.

It all works, but once the page is created once it’s cached and won’t display the new values if you go back and make a new selection. I’ve tried applying the following fix:

$('#instrument').bind('pagehide', function(){
  $(this).remove();
});

Which does remove the page, but if you try to navigate back to that page it won’t re-initialize and I’ll just keep getting pushed back to the beginning of my app.

The dynamic content has to be added to the page using pagebeforecreate (the actual HTML doesn’t seem important, so I won’t include it here) otherwise it won’t be formatted. If I use pagebeforeshow the content will not be formatted, but it WILL change if you go back and make a new selection.

I realize that pagebeforecreate will cache the page, but it doesn’t appear that I can use any other method due to the content not formatting 🙁

I can’t for the life of me figure out a fix!

  • 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-05-24T08:15:20+00:00Added an answer on May 24, 2026 at 8:15 am

    Try using pagebeforeshow but call page() when the page is shown to fix up all the formatting.

    Like this:

    $('#instrument').bind('pagebeforeshow', function() {
      // Do your content insertion
    });
    
    $('#instrument').bind('pageshow', function() {
      $(this).page();
    });
    

    You may find that this only “half” works (doesn’t update formatting when page is updated), in which case you might try this trick: wrapping up the page in a temporary element and calling page() on the wrapper.

    $('#instrument').bind('pageshow', function() {
      $(this).wrap('<div id="temporary-instrument-wrapper">');
      $('#temporary-instrument-wrapper').page();
      $(this).unwrap();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With jQuery Mobile I can create a page using a custom theme <div data-role=page
jQuery mobile 1.0 I change the content of the page, to put it simple:
In JQuery Mobile I am using changePage() to redirect back to a previous page,
I'm using a jquery mobile custom select menu for a selection of countries. I
I'm using JQuery-Mobile. On specific child page loads, I want to perform one JavaScript
I a using jquery mobile to create a mobile web page. I defined a
My Jquery mobile application has a simple login page through which the user will
I've built a Jquery Mobile Android App using Phonegap which contains a form with
I'm using jquery mobile link and i'm setting it like below: <a data-theme=a data-iconpos=notext
I'm using jQuery Mobile and Scrollview . This has been the perfect solution for

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.