If you use hide / show or fadeIn / fadeOut, you may encounter some kind of "jumping" effect, because it changes the CSS display property. I would suggest using animation with opacity.
Like this:
$('#container').animate({'opacity': 0}, 1000, function () { $(this).text('new text'); }).animate({'opacity': 1}, 1000);
Viktor Stískala Sep 08 '10 at 18:01 2010-09-08 18:01
source share