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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:21:21+00:00 2026-06-12T09:21:21+00:00

I need to able to hide the header/footer when the device orientation event is

  • 0

I need to able to hide the header/footer when the device orientation event is called (I’d also settle for changing their data-position=”fixed” attribute to not-fixed)

I’ve tried:

$(window).bind('orientationchange resize', function(event){

            if(event.orientation == 'portrait') {
                //do something
            } 
            if (event.orientation == 'landscape') {
                $.mobile.fixedToolbars.show(false);
            }
    });

I’ve also used:

$.mobile.fixedToolbars.hide(true);

But neither seems to do the trick. Has this been removed from JQM 1.1?

  • 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-12T09:21:21+00:00Added an answer on June 12, 2026 at 9:21 am

    With css media queries it’s very simple to hide elements depending on the device orientation:

    /* portrait */
    @media screen and (orientation:portrait) {
      /* portrait-specific styles */
    }
    
    /* landscape */
    @media screen and (orientation:landscape) {
      /* landscape-specific styles */
    }
    

    here is working example:

    http://jsfiddle.net/5TDg9/bwzdr/show/

    (be sure to open this link with your mobile device)


    EDIT:

    I improved the above sample with a javascript-based detection of the orientation (added to the css), theoretically you could pass anything after “case”:

    $(window).bind( 'orientationchange', function(e){
        var orientation="portrait";
        if(window.orientation == -90 || window.orientation == 90) orientation = "landscape";
    
        $("#status").html(orientation);  
    
        switch(orientation){
          case 'portrait':
            // alert('portrait');
            $.mobile.fixedToolbars.setTouchToggleEnabled(true);
            break;
          case 'landscape':
            // alert('landscape');        
            $.mobile.fixedToolbars.setTouchToggleEnabled(false);
            break;
          default:
            break;
        };        
    });
    

    Example here

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

Sidebar

Related Questions

Users of the website need to able to store images in their area ,
Now that I have nginx setup I need to be able to hide my
I need to be able to hide an image that appears when clicking on
I need to be able to hide the navbar and tabbar when I tap
I need to be able to hide and show divs on a page. I
I need to be able to hide on default specific rows within a table.
I'm building a treasure hunter app and I need to be able to hide
I need to be able to transmit data from a Flash browser application to
I need to be able to hide/show multiple div tags on the same page
I need to be able to hide 2 options that are displayed from my

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.