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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:17:38+00:00 2026-05-29T11:17:38+00:00

I have a need to use the tabs in my jquery mobile application. I

  • 0

I have a need to use the tabs in my jquery mobile application. I looked at the navbars in jquerymobile but it opens a totally different page. Whereas jquery UI opens the tabs in the same page. Is there any way I can mimic that behavior.
thanks

Please notice that I am asking to, for the lack of better term, transform the behavior of navbars of jquerymobile to that of UI tabs

  • 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-29T11:17:39+00:00Added an answer on May 29, 2026 at 11:17 am

    Here is a sample of how to mimic tab behaviour using navbar.It is a basic thing only and needs more work to make it perfect.But I think it can serve as a starting point.

    <!DOCTYPE html> 
    <html> 
        <head> 
        <title>My Page</title> 
        <meta name="viewport" content="width=device-width, initial-scale=1"> 
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
        <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
        <script>
            var prevSelection = "tab1";
            $("#navbar ul li").live("click",function(){
                var newSelection = $(this).children("a").attr("data-tab-class");
                $("."+prevSelection).addClass("ui-screen-hidden");
                $("."+newSelection).removeClass("ui-screen-hidden");
                prevSelection = newSelection;
            });
        </script>
        <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
        <style>
            .tab-content{
                width:100%;
                height:250px;
                background-color:white;
                border-bottom-left-radius:0.5em;
                border-bottom-right-radius:0.5em;
            }
            .tab-content>div{
                padding:5px;
            }                   
    
        </style>
        </head> 
    
        <body> 
            <div data-role="page">
    
            <div data-role="header">
            <h1>My Title</h1>
            </div><!-- /header -->
    
            <div data-role="content">   
                <div data-role="navbar" id="navbar">
                    <ul>
                        <li><a href="#" class="ui-btn-active" data-tab-class="tab1">Tab1</a></li>
                        <li><a href="#" data-tab-class="tab2">Tab2</a></li>
                        <li><a href="#" data-tab-class="tab3">Tab3</a></li>
                        <li><a href="#" data-tab-class="tab4">Tab4</a></li>
                    </ul>
                </div>
                <div class="tab-content">
                    <div class="tab1">
                        Tab1
                    </div>
                    <div class="tab2 ui-screen-hidden">
                        Tab2
                    </div>
                    <div class="tab3 ui-screen-hidden">
                        Tab3
                    </div>
                    <div class="tab4 ui-screen-hidden">
                        Tab4
                    </div>
                </div>
            </div><!-- /content -->
    
            </div><!-- /page -->
        </body>
    </html>
    

    A demo here – http://jsfiddle.net/m8wQM/

    Let me know if it helps.

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

Sidebar

Related Questions

I have a need to use only 2 tabs in my application. So I
I need to use something like get_or_create() but the problem is that I have
I have an application where I need to use 'Basic Authentication'; however, in order
I have a timed page that I need to use to submit a form
I have an ASP .NET page where I use jQuery. I used this function
I need to use jquery tabs in my asp.net website with ajax mode to
I need jQuery tabs that will also work with a URL Example I have
I have a need to launch multiple browser instances / tabs in succession but
I have big web application using JQuery UI Tabs. In central JS file I
I have a jquery driven web application and a particular page on the site,

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.