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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:59:59+00:00 2026-06-02T05:59:59+00:00

I have a jquery mobile app that has a page. This page has three

  • 0

I have a jquery mobile app that has a page. This page has three DIVs, I programmatically choose one of these DIVs based on a variety of variables. Regardless, the one DIV contains a select element. This element has 20 items in it. Because of the shear quantity, the select box opens in its own dialog. I’m fine with that, however, after a user makes a choice, the pagebeforeshow event of my hosting page is fired again. My problem is, I can’t seem to figure out how to detect that this event was fired as a result of the user choosing an option or closing the select dialog.

Is there a way to detect in the pagebeforeshow event how we got here?

  • 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-02T06:00:01+00:00Added an answer on June 2, 2026 at 6:00 am

    jQuery mobile passes meta-data to the callback functions of most events. From the docs on pagebeforehow:

    Triggered on the “toPage” we are transitioning to, before the actual transition animation is kicked off. Callbacks for this event will recieve a data object as their 2nd arg. This data object has the following properties on it:

    • prevPage (object) – A jQuery collection object that contains the page DOM element that we are transitioning away from. Note that this collection is empty when the first page is transitioned in during application startup.

    You should be able to use this in your callback function to branch to your advantage, i.e. detect if prevPage is the current page. This might look like:

    $('#yourPage').live('pagebeforeshow', function(event, data) {
        var from = data.prevPage;
        // do some inspection of `from` and branch accordingly
        // might require some experimental console.logging first
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SELECT element on one of my jQuery Mobile pages that has
we are creating one jQuery mobile app in that app, I have to bind
I have a page in my jQuery Mobile app with two link-based buttons, I
I have a single page jQuery Mobile app with four data-role='pages' in place; so,
I am working on a mobile app and I have an initial page that
In a rails 3.0 app that uses jquery mobile for mobile devices I have
Say I have a mobile web app written using JQuery Mobile, this app retrieves
I have a simple Android App using simple js, jquery mobile and phonegap that
I have a mobile app created using HTML/JS(jQuery)/CSS and I'm looking to include page
I have a jquery mobile web app. On my iPhone when I am on

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.