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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:28:15+00:00 2026-06-04T17:28:15+00:00

im new in mobile dev, im working on a simpl mobile app. im using

  • 0

im new in mobile dev, im working on a simpl mobile app.
im using jquery mobile.
how can i get the value of the selected navbar?
my firt page is like this:

<div data-role="page" data-title="first" id="first"  > 

         <div data-role="header" data-position="fixed" id="myheader">
         <div data-role="navbar">
         <ul>
            <li><a href="#"  class="ui-btn-active ui-state-persist">V</a></li>
            <li><a href="#"  class="ui-btn-active ui-state-persist">B</a></li>
            <li><a href="#"  class="ui-btn-active ui-state-persist">R</a></li>
            <li><a href="#"  class="ui-btn-active ui-state-persist">C</a></li>
        </ul>
        </div>
     </div>
         <div data-role="content" id="de">
         <a href="#" data-role="button" onclick="simpldial()" >Afficher</a>
    </div>
</div>  

the function simpledial is this:

function simpledial() {

    $('div #body').simpledialog2({
            mode: 'blank',
            headerText: '' ,
            headerClose: false,
            blankContent : 
              "<ul data-role='listview'>" +
                    "<li><a href='#second'>go second page</a></li>" +

              "</ul>"+
                "<a rel='close' data-role='button' href='#'>Close</a>"
          });
}  

the second page :

<div data-role="page" data-title="second" id="second"  > 

         <div data-role="header" data-position="fixed" id="myheader">


     </div>

<div data-role="content" id="dd">


        <!-- Here i want to get the selected navbar in the first page -->
    </div>

     </div>
  • 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-04T17:28:16+00:00Added an answer on June 4, 2026 at 5:28 pm

    In the code you posted, all buttons are active because of the ui-btn-active class you added.

    You should only use that class with the ui-state-persist with the nav you want active. Having that fixed, it would be as simple as:

    $('a.ui-btn-active').text();
    

    And you’ll get the text of the current navbar. If you want to select it in all pages of your application you should bind that getter to the pageBeforeCreate event:

    $( '#aboutPage' ).on('pagebeforecreate',function(event){
      var currentNav = $('a.ui-btn-active').text();
      // Do fancy things with it
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using PhoneGap + jQuery Mobile for a new mobile app. This plugin is
I have checkboxes in spilt view of jQuery mobile and I can not get
I'm using the new jquery mobile 1.0 alpha 1 release to build a mobile
I'm new to mobile development. I'm using Phonegap/Cordova to create a cross-platform app. My
I'm new mobile development and i'm working on an proof of concept application on
I am new to jquery mobile, and am having problems getting content I have
Hi there Im new to mobile application development. I had developed Android apps using
I am new to mobile development, but have some experience with web app development.
I'm new to mobile dev and I'm interested in developing the application for iOS,
I am relatively new to jquery and jquery mobile. I have a new mobile

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.