Hi Folks This script fades out a div tag with id #pageArticle, gets fresh content from an anchor ajax post, and is Supposed to fade the new content in. But it won't handle from replaceWith onwards properly. New content just suddenly appears.
Is there a way to get around this? I have tried opacity and hidden styles in the new div but I get an empty screen. Guess fadeIn doesn't use those values, or the style is overriding fadeIn's effect. Help!! // Substitutes the URL called from all <a> in menu $("#menuJ a").click(function() { var js = $(this); $("#pageArticle").fadeOut(500, function() { $.post( js.attr("href"), null, function(response) { var bob = "<div id=\"pageArticle\">" + response + "</div>"; $("#pageArticle").replaceWith(bob); $("#pageArticle").fadeIn(500); }, "html"); }); return false; }); Thanks in advance. New to this game.