lurning too koad
lurning too koad

Reputation: 2964

JQuery: hiding and then showing

Right now what I have works but it worries me because I don't think it should.

CSS:

#logo {
    display:none;
}

JQuery:

$("#logo").delay(800).fadeIn(800);

This setup works but when exposing the logo with JQuery, shouldn't JQuery alter the CSS? Does the JQuery fadeIn command automatically change display:none to display:inline/initial/block/etc?

Upvotes: 1

Views: 63

Answers (1)

MiDri
MiDri

Reputation: 747

Yes jQuery assigns an inline display:block to block elements and display:inline to inline elements when using fadeIn, fadeOut, and the misc slide functions. That is why it works.

Upvotes: 1

Related Questions