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

  • Home
  • SEARCH
  • 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 7694015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:13:19+00:00 2026-05-31T21:13:19+00:00

I am using jquery mobile. I would like to navigate from one page to

  • 0

I am using jquery mobile. I would like to navigate from one page to another and force an ajax call. Right now if I navigate for the first time it will store the pages in the DOM. Then the next time you go to that sub page it uses what is in the DOM rather than ajaxing it in again. If I put the following on the links to the other pages then it works on the desktop, but it does not work on the mobile device since the mobile device does not have a “click”.

<a href="page2.php" data-ajax="true" onclick="$(document.getElementById($(this).attr('href'))).remove();" >link</a>

I tried to put this functionality into the head of the document within a jquery function like this with the idea of changing the “click” to “tap” as described in the documentation.

$('a').live('click', function() {
  var $this = $(this);
  if ( !$this.attr('rel') || $this.attr('rel') != 'external' )
  $(document.getElementById( $this.attr('href') )).remove();
});

But this will remove the page after it goes to it.

What I need it to do is remove the page, then load it again. I found in the documentation that the event pagebeforechange but I have not found how or if this would work.

What is the best way to transition from one page to another and force the ajax loading of the page even if the page has been previously view?

  • 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-31T21:13:21+00:00Added an answer on May 31, 2026 at 9:13 pm

    How bout this:

    button:

    <a id="button">link</a>
    

    JQuery

    $(document).on('vclick', '#button', function(){
        $.mobile.changePage( "page2.php", { reloadPage: true } );
    });
    

    Update: Changed to a better answer.
    Update: Added more for clarity.

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

Sidebar

Related Questions

I would like to append some code to a page using jQuery/jQuery mobile, but
I am using jQuery Mobile and have few pages in one HTML page. When
Ok I'm using the jQuery Mobile framework and I would like to be able
I'm using JQuery-Mobile. On specific child page loads, I want to perform one JavaScript
I'm working on a mobile app using jQuery Mobile and I would like to
I'm building a mobile application using jQuery Mobile and I would like to implement
In my mobile app, using jQuery Mobile... I would like to make a simple
i would like to load 3 images in a canvas. I'm using jquery mobile
I'm working on a mobile-friendly website using jQuery Mobile but would like to do
I'm using a very standard one-page model for JQueryMobile development like: <div id=page1 data-role=page>Lorem

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.