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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:21:05+00:00 2026-05-30T18:21:05+00:00

EDIT 2/13: The Panels widget in jQuery Mobile 1.3 now exists! Please use this

  • 0

EDIT 2/13: The Panels widget in jQuery Mobile 1.3 now exists! Please use this instead.

I’m trying to write a custom CSS-based transition in jQuery Mobile to simulate the slide-out navigation design pattern.

What I’m trying to accomplish is to have the navigation slide into view and take up 75% of the viewport space. The remaining 25% is filled with the remainder of the previous page.

Here’s my CSS:

.slidenav.in { /*New page coming in*/
    -webkit-transform: translateX(-75%);
    -webkit-animation-name: slidenav-in;
}

@-webkit-keyframes slidenav-in {
    from { -webkit-transform: translateX(-75%); }
    to { -webkit-transform: translateX(0); }
}

.slidenav.out { /*Old page going out*/
    -webkit-transform: translateX(0);
    -webkit-animation-name: slidenav-content-out;
}

@-webkit-keyframes slidenav-content-out {
    from { -webkit-transform: translateX(0); }
    to { -webkit-transform: translateX(75%); }
}

.slidenav.in.reverse { /*Old page coming in*/
    -webkit-transform: translateX(75%);
    -webkit-animation-name: slidenav-content-in;
}

@-webkit-keyframes slidenav-content-in {
    from { -webkit-transform: translateX(75%); }
    to { -webkit-transform: translateX(0); }
}

.slidenav.out.reverse { /*New page going out*/
    -webkit-transform: translateX(0);
    -webkit-animation-name: slidenav-out;
}

@-webkit-keyframes slidenav-out {
    from { -webkit-transform: translateX(0); }
    to { -webkit-transform: translateX(-75%); }
}

I can’t seem to get it to do what I want, though. It removes the old page entirely instead of leaving the remaining 25% of the page in view.

You can see what’s happening here (Webkit browsers): http://jsbin.com/ukajeb/7

What am I doing wrong?

  • 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-30T18:21:06+00:00Added an answer on May 30, 2026 at 6:21 pm

    EDIT 2/13: The Panels widget in jQuery Mobile 1.3 now exists! Please use this instead.

    So I worked some more on this and, with the help of Firebug, discovered that after the keyframe animation was occurring, the original page was being reset to its original position and display set to none.

    Knowing this, I started going through the jQuery Mobile docs a bit more thoroughly and found that there are Page Transition Events that you can bind to. More specifically, the pageshow and pagehide events.

    Then I set the CSS of the original page manually:

    $('[data-role=page]').live('pagehide',function(event, ui){
        $(this).css({
            "display": "block",
            "-webkit-transform": "translateX(75%)"
        });
    });
    $('[data-role=page]').live('pageshow',function(event, ui){
        $(this).css({
            "display": "",
            "-webkit-transform": ""
        });
    });
    

    Check it out here (Webkit browsers): http://jsbin.com/ukajeb/3

    Hope someone else finds this useful as well!

    Note: This demo uses jQuery Mobile 1.0.1, which only supports jQuery 1.6.4. This is why .live() was used rather than .on(). However, the upcoming jQuery Mobile 1.1.0 will support jQuery 1.7.1, so moving forward .on() should be used in place of the deprecated .live().

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

Sidebar

Related Questions

I need to create a GWT Custom Widget. This widget will contain a panel
EDIT: As in the example (now written by me) what I'm trying to achieve
Edit: This question was written in 2008, which was like 3 internet ages ago.
EDIT: This was formerly more explicitly titled: - Best solution to stop Kontiki's KHOST.EXE
EDIT: This question is more about language engineering than C++ itself. I used C++
Edit: This was accidentally posted twice. Original: VB.NET Importing Classes I've seen some code
I have the below function creating new panels inside my ViewStack.. This works fine
I have an AJAX application which has used CSS divs to create panels on
I have change the default display of a node type to use panels but
I am trying to have two panels, the left showing a graphic and two

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.