Skip to main content

Bug Tracker

Side navigation

#11303 closed bug (invalid)

Opened February 07, 2012 09:19PM UTC

Closed February 08, 2012 09:11AM UTC

Last modified May 11, 2013 06:48AM UTC

FadeIn doesn't keep block format

Reported by: ryannaddy Owned by:
Priority: low Milestone: None
Component: effects Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

While using fadeIn() on an <a> tag with a css "block" display type, it removes the block format when it fades in. It seems to do the same on other inline elements as well. It works fine on the <div> tag though.


Attachments (0)
Change History (2)

Changed February 08, 2012 09:11AM UTC by sindresorhus comment:1

component: unfiledeffects
priority: undecidedlow
resolution: → invalid
status: newclosed

Simplified testcase:

The problem is that you have a rule "display: none" after "display: block" which overwrites it. Since the display value is none, jQuery will instead use the default display value of the a-tag, which is "inline".

You can work around this by doing something like this instead:

$('.nav-link').fadeIn().css('display', 'block');

Changed May 11, 2013 06:48AM UTC by Sagan Internet Marketing comment:2

Thanks for the idea to use

.css('display', 'block');