When you use replaceWith the content will be visible that is why there is no smooth transition.
First hiding the div and then calling fadeIn will give smooth transition.
$('#myDivID').fadeOut('slow', function() {
$('#myDivID').replaceWith("" + content + "
");
$('#myDivID').fadeIn('slow');
});