Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#3585 closed bug (invalid)

fadeOut incorrectly sets display:none

Reported by: wichert Owned by:
Priority: major Milestone: 1.3.2
Component: effects Version: 1.3.1
Keywords: Cc: wichert, flesler
Blocked by: Blocking:


fadeOut is document to only set modify the opacity. However a test with jQuery 1.2.6 shows that after having animated to an opaicty of 0 it sets a display:none on the element(s), which has many undesirable side effects.

Change History (6)

comment:1 Changed 14 years ago by flesler

Cc: wichert flesler added

I agree. Can you post about this to the jQuery dev group ?

comment:2 Changed 14 years ago by scott.gonzal

I don't see how display: none is undesirable. I think this is the most commonly expected behavior.

comment:3 Changed 14 years ago by carpii

You can work around this feature by using fadeTo("fast", 0);

This will fade the element, and set visibility to hidden, however it will leave 'display' intact and thus wont disrupt the flow of your document

comment:4 Changed 14 years ago by carpii

However it works though, please can we update the api docs for fadeIn/fadeOut?

They do say it only affects opacity, and a brief google shows quite a few people are falling foul of the same assumption

comment:5 Changed 14 years ago by dmethvin

I would think fadeOut sets display: none because otherwise the element would pass the :visible test. Or is it a bug that opacity: 0 is :visible?

comment:6 Changed 14 years ago by john

Resolution: invalid
Status: newclosed

This is definitely the intended behavior - and the docs are up to date, as well.

Note: See TracTickets for help on using tickets.