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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:46:25+00:00 2026-05-23T11:46:25+00:00

If a element has a display:none on it in the CSS, then animating the

  • 0

If a element has a display:none on it in the CSS, then animating the opacity from 0 to 1 in jQuery doesn’t make the element visible.

why?

what do I need to add in animate() to make it visible?

el.css({
            opacity: 0,
            left: - 200
          }).stop().animate({
            opacity: 1,
            left: 0
          }, {
            duration: 333
          });
  • 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-23T11:46:26+00:00Added an answer on May 23, 2026 at 11:46 am

    You’d need to show it first using the show()[docs] method.

    If your element isn’t already at opacity 0, then you’d probably want to set that first:

    .css('opacity',0).show().animate({opacity:1});
    

    Example: http://jsfiddle.net/DnE7M/1/


    Or you could just use the fadeIn()[docs] method, which should take care of the display as well.

    Example: http://jsfiddle.net/DnE7M/


    EDIT: To make it relevant to the code added to the question:

    el.css({
            opacity: 0,
            left: - 200
          })
       .stop()
       .show()     // <-- make the element able to be displayed
       .animate({
            opacity: 1,
            left: 0
          }, {
            duration: 333
          });
    

    You could also do it right in the call to the css()[docs] method:

    el.css({
            opacity: 0,
            display: 'block',  // <-- 'block' or whatever is appropriate for you
            left: - 200
          })
       .stop()
       .animate({
            opacity: 1,
            left: 0
          }, {
            duration: 333
          });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm interested in a way to check whether an element has display:none style explicility
How can I use jQuery to determine whether an element has a certain style
I need to know when I click on an element if this element has
I need to style an element that has both class .a and class .b
Say there is a css style declaration to an element which has been set
Using jQuery, one can easily find out whether a particular element is visible using
I have this set of code that adds a display:none css class to a
from jquery docs an element is hidden when : An ancestor element is hidden,
I have the following css and html... .hide { display:none; } <div> <span class='kardashian
I want to check if an element has the class .active, if it does

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.