tags:

views:

281

answers:

2

the default fade behavior is display:none . which changes the layout of my page. how can I make it fade to visibility:none so that the page's layout stays the same

+2  A: 

You can try this for fadeOut:

$("something here").fadeOut("slow", function() {
    $(this).show().css({visibility: "none"});
});

...and this for fadeIn:

$("something here").hide().css({visibility: "visible"}).fadeIn("slow");
icktoofay
+3  A: 

Also

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

Gaby
Opacity goes up to 1, not 100.
icktoofay
@icktoofay, very correct..
Gaby