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
2010-02-13 03:55:28
+3
A:
Also
instead of .fadeIn()
you can .animate({opacity:1})
and instead of .fadeOut()
you can .animate({opacity:0})
Gaby
2010-02-13 04:06:14
Opacity goes up to 1, not 100.
icktoofay
2010-02-13 04:10:28
@icktoofay, very correct..
Gaby
2010-02-13 04:15:34