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
I'm using JQuery-Mobile. On specific child page loads, I want to perform one JavaScript
I'm using the new jquery mobile 1.0 alpha 1 release to build a mobile
I'm using jQTouch to build a simple mobile app with an html/js/jquery form that
My jQuery Mobile app consists of a single index.html page and contains only one
My jquery mobile page is WAY to zoomed out. I have tried everything I
I am using JQuery Mobile Datebox as I am having the following problem. I
I'm using jQuery Mobile and have turned off the default AJAX handling of forms
I am using jquery mobile alpha 4. I simply bind a click event on
I'm using Jquery mobile framework. I have 2 html files which has two buttons

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.