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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:46:50+00:00 2026-05-28T02:46:50+00:00

We are developing an application with the layout near to the jqm examples here

  • 0

We are developing an application with the layout near to the jqm examples here( table of contents on left and contents at right) but we want the same behavior as Sencha mobile, when it’s in portrait, the table of contents collapses in a navigation button here

Is it possible to do with jqm?

  • 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-28T02:46:50+00:00Added an answer on May 28, 2026 at 2:46 am

    I have created a sample jQuery Mobile application which works like this – When in portrait mode,a split view layout will be shown.When in landscape mode,navigation can be done via a button in the header.For illustrating this in a desktop browser,I have given the width to check as 500px.If width>500 px ,split view. If width <500px, button in header.

    This is the source code:

    <!DOCTYPE html>
    <html>
        <head>
            <title>Page</title>
    
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
            <link rel="stylesheet" href="http://jquerymobile.com/test/docs/_assets/css/jqm-docs.css"/>
            <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
            <script>
                function showNavList() {
                    $(".navdiv").toggle();
                }
    
                $(".page").live("pagebeforeshow", function() {
                    $(".navdiv").hide();
                });
            </script>
            <script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
            <style>
    
            .content-secondary{
                margin: 0px !important;
                padding:0px !important;
            }
    
            /*refer http://css-tricks.com/snippets/css/media-queries-for-standard-devices/ */
            /* Smartphones (landscape) ----------- */
            @media all and (min-width: 501px){/*For demo in desktop browsers,gave 501.Should be 321px.Refer above link*/
                .headerNav{
                    display:none !important;
                }
                .content-secondary{
                    display: block;
                }
                .navdiv{
                    display:none !important;
                }
            }
    
            /* Smartphones (portrait) ----------- */
            @media all and (max-width: 500px){/*320px*/
                .headerNav{
                    display:block !important;
                }
                .content-secondary{
                    display: none;
                }
            }
            </style>
        </head>
        <body>
            <div data-role="page" class="page" id="page1">
                <div class="navdiv" style="width:150px;top:38px;left:5px;position:absolute;z-index:1000;display:none">
                    <ul data-role="listview">
                        <ul data-role="listview"  data-theme="c">
                            <li  class="ui-btn-active" data-icon="false">
                                <a href="#page1">Page 1</a>
                            </li>
                            <li data-icon="false">
                                <a href="#page2">Page 2</a>
                            </li>
                            <li data-icon="false">
                                <a href="#page3">Page 3</a>
                            </li>
                        </ul>
                    </ul>
                </div>
                <div data-role="header">
                    <h1>Page 1</h1>
                    <a href="#" class="headerNav" onclick="showNavList()">Navigation</a>
                </div><!-- /header -->
                <div data-role="content">
                    <div class="content-primary">
                        Content1
                    </div>
                    <div class="content-secondary">
                        <ul data-role="listview"  data-theme="c">
                            <li  class="ui-btn-active" data-icon="false">
                                <a href="#page1">Page 1</a>
                            </li>
                            <li>
                                <a href="#page2" data-icon="false">Page 2</a>
                            </li>
                            <li>
                                <a href="#page3" data-icon="false">Page 3</a>
                            </li>
                        </ul>
                    </div>
                </div><!-- /content -->
            </div><!-- /page -->
            <div data-role="page" class="page" id="page2">
                <div class="navdiv" style="width:150px;top:38px;left:5px;position:absolute;z-index:1000;display:none">
                    <ul data-role="listview">
                        <ul data-role="listview"  data-theme="c">
                            <li data-icon="false">
                                <a href="#page1">Page 1</a>
                            </li>
                            <li data-icon="false" class="ui-btn-active">
                                <a href="#page2">Page 2</a>
                            </li>
                            <li data-icon="false">
                                <a href="#page3">Page 3</a>
                            </li>
                        </ul>
                    </ul>
                </div>
                <div data-role="header">
                    <h1>Page 2</h1>
                    <a href="#" class="headerNav" onclick="showNavList()">Navigation</a>
                </div><!-- /header -->
                <div data-role="content">
                    <div class="content-primary">
                        Content2
                    </div>
                    <div class="content-secondary">
                        <ul data-role="listview"  data-theme="c">
                            <li data-icon="false">
                                <a href="#page1">Page 1</a>
                            </li>
                            <li  class="ui-btn-active" data-icon="false" >
                                <a href="#page2">Page 2</a>
                            </li>
                            <li data-icon="false">
                                <a href="#page3">Page 3</a>
                            </li>
                        </ul>
                    </div>
                </div><!-- /content -->
            </div><!-- /page -->
            <div data-role="page" class="page" id="page3">
                <div class="navdiv" style="width:150px;top:38px;left:5px;position:absolute;z-index:1000;display:none">
                    <ul data-role="listview">
                        <ul data-role="listview"  data-theme="c">
                            <li data-icon="false">
                                <a href="#page1">Page 1</a>
                            </li>
                            <li data-icon="false">
                                <a href="#page2">Page 2</a>
                            </li>
                            <li data-icon="false" class="ui-btn-active">
                                <a href="#page3">Page 3</a>
                            </li>
                        </ul>
                    </ul>
                </div>
                <div data-role="header">
                    <h1>Page 3</h1>
                    <a href="#" class="headerNav" onclick="showNavList()">Navigation</a>
                </div><!-- /header -->
                <div data-role="content">
                    <div class="content-primary">
                        Content3
                    </div>
                    <div class="content-secondary">
                        <ul data-role="listview"  data-theme="c">
                            <li>
                                <a href="#page1">Page 1</a>
                            </li>
                            <li>
                                <a href="#page2">Page 2</a>
                            </li>
                            <li  class="ui-btn-active">
                                <a href="#page3">Page 3</a>
                            </li>
                        </ul>
                    </div>
                </div><!-- /content -->
            </div><!-- /page -->
        </body>
    </html>
    

    This is not a foolproof application.But just a rough copy to illustrate how this feature can be done.There are still lot of things to be done to make this work perfectly.

    To make it work I have used the concept of media queries.Using it you can selectively hide/show the layout depending on the browser width(orientation of device).

    P.S. I have used jqm-docs.css for this example.This css has other media queries too targeting other widths.So there might be some weird layout issues when you test this code.Please modify that css to remove the unwanted media queries.

    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

Am developing android application which contains floating menu effect from left to right. I
I developing an application in which i calling web services on iphone. I want
I developing an application in which i want to print the values on a
I want to achieve a simple frame layout with fixed header, fixed left navigation
I am developing a simple WPF application without any auto layout. The goal is
I'm developing a web application that has a certain layout. I'm mainly using CSS
For the application I am currently developing, I need to adapt the layout of
I m developing an appliaction, same application was developed in Android, In Android there
I'm developing a simple application. The layout is: when you open the application, a
I'm developing a PHP application in a IDE, and want to use Git for

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.