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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:30:21+00:00 2026-06-07T16:30:21+00:00

How to make jquery mobile collapsible content appear with animation using css transition? .ui-collapsible

  • 0

How to make jquery mobile collapsible content appear with animation using css transition?

.ui-collapsible {
  -webkit-transition: all 1s;
  -moz-transition: all 1s;
  -ms-transition: all 1s;
  -o-transition: all 1s;
  transition: all 1s;
}

Not working.

  • 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-07T16:30:23+00:00Added an answer on June 7, 2026 at 4:30 pm

    jQuery Mobile’s collapsible elements are shown and hidden by toggling display: none on the div of the collapsible content. As far as I know, all major browsers disable CSS transitions when the display property is changed.

    An alternative would be overriding the default CSS of jQuery Mobile to always use display: block for the collapsible content div, and then transition on the height or opacity property (depending on whether or not the content needs to be “removed” from the layout).

    I’ve created this jsFiddle, to demonstrate the transition using the opacity property. It is really just a matter of using the following CSS rules:

    .ui-collapsible-content {
        -webkit-transition: all 1s;
        -moz-transition: all 1s;
        -ms-transition: all 1s;
        -o-transition: all 1s;
        transition: all 1s;
        opacity: 1;
    }
    .ui-collapsible-content-collapsed {
        display: block;
        opacity: 0
    }
    

    Transition using the height property is a little trickier as the content div has no set height. This fiddle does the trick (also see CSS below), but it requires setting a height on the content div. You can change the height to auto, but then the slide down effect doesn’t look quite right in my opinion. Perhaps someone else knows a better method.

    .ui-collapsible-content {
        -webkit-transition: all 1s;
        -moz-transition: all 1s;
        -ms-transition: all 1s;
        -o-transition: all 1s;
        transition: all 1s;
        height: 2em; /* or auto */
        overflow: hidden;
    }
    .ui-collapsible-content-collapsed {
        display: block;
        height: 0;
        padding: 0 16px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Jquery mobile, so ignore some of the following overdone css, its not
Is there a way to make a collapsible element/set in jQuery Mobile not inset?
I am very interested in using CI phonegap and jquery to make mobile apps,
I’m using a jQuery mobile slider in a JQM dialog but it’s not being
I'm using jquery.mobile-1.0.1. I'm trying to make the page reload when clicking on the
I'm supposed to make a PC site readable on mobile devices. I'm using Jquery
I have the following jQuery Mobile HTML code, the navbar's content is set using
i am using Jquery mobile slider.I want make the slider in steps. so i
With jQuery mobile I'm using a dynamic 'page' template with custom content inserted depending
I'm using jQuery Mobile on an MVC 3 website. Working well except that I

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.