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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:16:01+00:00 2026-06-10T04:16:01+00:00

Simple question: How does jQuery know what display mode an element should use when

  • 0

Simple question: How does jQuery know what display mode an element should use when using fadeIn?

What I mean, is that it appears to use the proper display mode for any element that I fadeIn, even when I set display:none initially in my CSS – images are using inline, divs are using block, etc.

I looked into the jQuery source code on GitHub, but I couldnt locate what I was looking for.

Reason I ask is because I am making a little plugin myself, using fade (but with Animate, since there is more than 1 property that needs animation).

  • 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-10T04:16:03+00:00Added an answer on June 10, 2026 at 4:16 am

    It uses $.data to store it:

    console.log($._data( elem, "olddisplay" ));
    

    The underscore means that it can access data that is not normally available through $.data or $.fn.data. Basically this is for internal use only and you should not touch it.

    If the element is set to display:none through CSS, and you fade it in, jQuery still knows to make it inline etc. In this case, it uses the function

    // Try to determine the default display value of an element
    function css_defaultDisplay( nodeName ) {
    

    Which would give "inline" for a nodeName === "span"

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

Sidebar

Related Questions

Simple question: does the Java memory/synchronization model guarantee atomic pointer writes? That is, if
Very simple question. What does the term 'seeding' mean in general? I'll put the
Have a rather simple question. Does anyone knows if i can use jparallax both
I noticed that the jQuery parseJSON basically does a simple regex check: parseJSON: function(
This is a simple question. I want to create an inline calendar that does
Really simple question: Am I missing something? Seems like this should be all that
Simple question - what does this actually do? var oq = (ObjectQuery<TEntity>)L2EQuery; return ExecuteFirstorDefault<TEntity>(oq,
* Simple question : Why does this function throw an exception when evaluated ?
Very simple + silly question: Does clojure provide multi maps? I currently have something
Simple question, to repeat the title: Does closing the WinForms application stops all active

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.