Oops! Make that... otherwise you get nested divs.
$("#menuJ a").click(function(){
var js = $(this);
$("#pageArticle").fadeOut(500, function()
{
$.post( js.attr("href"), null, function(response)
{
$("#pageArticle").html(response);
$("#pageArticle").fadeIn(500);
},
"html");
});
Thanks Brian
The working script is as follows:
$("#menuJ a").click(function(){
var js = $(this);
$("#pageArticle").fadeOut(500, function()
{
$.post( js.attr("href"), null, function(response)
{
var bob = "" + response + "";
$("#pageArticle").html(bob);
$("#pageArticle").f
I believe the sudden appearance is due to the fact that the new div
was not hidden. But, a better approach would be to not replace the
#pageArticle div. Instead, replace its contents, then fade it in.
On Fri, Dec 11, 2009 at 5:02 PM, S9DD wrote:
> Hi Folks
>
> This script fades out a div tag with
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 opaci
4 matches
Mail list logo