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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:29:26+00:00 2026-06-16T19:29:26+00:00

After a lot of google’ing and reading forums I’ve not found a suitable answer.

  • 0

After a lot of google’ing and reading forums I’ve not found a suitable answer.

So far all I have found is something like below:

  • show loading message
  • call change page
  • hide loading message

This would work but I would have to do this every time I call load/change page (which is a lot).

Which would leave me either to make a middle man function like below:

function customLoader(url){
    showLoader();
    $.mobile.changePage(url);
    hideLoader();
}

Is there anyway of binding it to the change page event?
So that it shows from the second changePage is called but hides once changePage is away…

I know the above middle man method would work but would like something more tidy and nicer to implement as there’s a lot of html/js files.

  • 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-16T19:29:27+00:00Added an answer on June 16, 2026 at 7:29 pm

    Something like this:

    $('#index').live('pagebeforeshow',function(e,data){    
        $('#test-button').live('click', function(e) {
            $.mobile.showPageLoadingMsg(true);
            setTimeout(function () {
                $.mobile.changePage('#second');
            }, 1000);
        });    
    });
    
    $("#second").live('pageshow', function () {
        $.mobile.hidePageLoadingMsg();
    });
    

    Timeout is here only so you can see it’s working successfully. This is a light example so transition is fired quickly. Remove it in your real code.

    And here’s an example: http://jsfiddle.net/Gajotres/arrHd/

    Every change page event cycle has a order of events occuring when a page A is transiting to a page B. No matter which action is used to trigger a change page you can always disable it when page B i successfully loaded. If you want to find more about page load order take a look at this link: https://stackoverflow.com/a/14010308/1848600. There you will find a lot about jQM page dynamics.

    In case you want to implement this into every page transition use this:

    $('[data-role="page"]').live('pageshow', function () {
        $.mobile.hidePageLoadingMsg();
    });
    

    This will hide a ajax loader (if it is open) every time a different page is successfully loaded and shown.

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

Sidebar

Related Questions

After reading up a lot on the Google Spreadsheet API I have come to
After a lot of posts in SO and Google, I could not find an
After a lot of reading and researching i found the following library , the
I have been reading a LOT of google posts and StackOverflow questions about how
After reading through many code examples for Google Guice, I see a lot of
I've heard that a lot of users installed iOS 6 after Google released the
After a lot of research on Stackoverflow and google, it seems that it's difficult
I've searched a lot but could not find any solutions for this. after changing
After google searching, searching this site as well as jQuery found there was no
I see a lot of google posts on this but all seems to be

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.