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

  • Home
  • SEARCH
  • 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 9298413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:19:08+00:00 2026-06-18T22:19:08+00:00

I have a couple of classes: hide is display: none , and transparent is

  • 0

I have a couple of classes: hide is display: none, and transparent is opacity: 0. The element pr_container has -webkit-transition: opacity 1s. The following JQuery-based code makes an element appear in an animated fasion:

pr_container.removeClass("hide");
setTimeout(function() { pr_container.removeClass("transparent"); }, 0);

However, when I remove setTimeout and instead just remove the second class, there is no animation. Why?

Edit: I’m using the latest Chrome, I haven’t checked other browsers yet.

Edit: I tried putting both calls in the same setTimeout callback – no animation. So it’s clearly about separation.

Edit: here’s the jsFiddle: http://jsfiddle.net/WfAVj/

  • 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-18T22:19:09+00:00Added an answer on June 18, 2026 at 10:19 pm

    You can’t make a transition if you are changing display property at the same time. So in order to make it work you have to hide your element some other way. For example:

    .hide {
        height: 0;
        width: 0;
        /* overflow: hidden; padding: 0; border: none; */
    }
    

    http://jsfiddle.net/dfsq/WfAVj/1/

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

Sidebar

Related Questions

I have following classes: Container , Element and then couple of classes that inherit
I have a couple of domain classes defined, Employee and EmployeeDesiredSkill, Employee has static
ok I have couple of .NET classes that I want to use in VBA.
I have a couple of questions relating to nested classes within Java. How do
I have couple resource DLLs that I currently load when application starts using following
I have a couple classes that have nearly identical code. Only a string or
I have created a couple of classes mean to represent a relational data structure
I have a couple of UITableViewController classes and I just noticed that these methods
here is a quick question, i have my couple view controllers classes, and have
I have couple of classes which inherits 1 base abstract class. It is mapped

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.