lars lars - 2 months ago 6
CSS Question

Fading elements in and out without changing the layout of the page

The normal behavior when using

and
fadeOut
is to use the
display
property
. However, this changes the layout of the page.

How can I make
fadeIn
and
fadeOut
not modify the layout of the page?

Answer

Also

instead of .fadeIn() you can .animate({opacity:1})
and instead of .fadeOut() you can .animate({opacity:0})

Comments