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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:37:23+00:00 2026-05-28T17:37:23+00:00

In JQuery Mobile I am using changePage() to redirect back to a previous page,

  • 0

In JQuery Mobile I am using changePage() to redirect back to a previous page, using the following.

$.mobile.changePage( previousPage.prevObject[0].id, { transition: "slide"} );

This all works fine. What I am having problems with is, if I am trying to clear the HTML elements from the page that I am leaving. using the following –

$('#navigation').html('');

This does not happen. If I use the correct back button provided in the JQuery Mobile UI such as this –

<a href="" onclick="clearNavigation();" data-rel="back">Back</a>

The onclick being the function to clear the HTML elements… this way works, but the animation is slow. It will first clear the HTML elements leaving a blank page and the redirect back to the previous page. This just does not look smooth. Is there a way I can redirect back and then remove the elements. to seem like I have speeded up the transition?

Thanks
Rory

PS – The function I currently have for clearNavigation() –

function clearNavigation(){
     $.mobile.changePage( previousPage.prevObject[0].id, { transition: "slide"} );
     $('#navigation').html('');
}
  • 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-28T17:37:24+00:00Added an answer on May 28, 2026 at 5:37 pm

    I’m not sure if this is what you’re looking for but have you tried jqmRemoveData() function?

    • http://jquerymobile.com/demos/1.0.1/docs/api/methods.html

    jqmData(), jqmRemoveData() (method)

    When working with jQuery
    Mobile, jqmData and jqmRemoveData should be used in place of jQuery
    core’s data and removeData methods (note that this includes
    $.fn.data, $.fn.removeData, and the $.data, $.removeData, and
    $.hasData utilities), as they automatically incorporate getting and
    setting of namespaced data attributes (even if no namespace is
    currently in use).

    • http://api.jquery.com/jQuery.removeData/
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In jquery mobile I m using $('#somebutton').click(function () { $.mobile.changePage(#searchResult, slide); }); to change
$.mobile.changePage('#notification', { transition: slidedown}); I have the code above using jquery.mobile-1.0rc2.min.js and I can
I'm using jQuery Mobile and Scrollview . This has been the perfect solution for
I'm using jquery.mobile-1.0.1. I'm trying to make the page reload when clicking on the
This is for a jQuery Mobile app using version 1.0.1. I'm trying to get
In order to load a jQuery mobile page using an anchor tag, one just
I am using JQuery Mobile Datebox as I am having the following problem. I
I am using jQuery Mobile and have few pages in one HTML page. When
I'm using jQuery Mobile and trying to figure out how to change a page
I am developing a mobile application using phonegap and jquery mobile. I have this

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.