使用fadeout fadein的load()来替换内容

时间:2014-01-21 13:26:21

标签: jquery html

如何使用jquery的load()函数与fadein和fadeout从另一个页面加载?

 $( ".content_here" ).fadeOut("slow").load("each_article_content.php","id="+id).fadeIn("slow")

但它无法正常工作

1 个答案:

答案 0 :(得分:2)

您需要使用函数回调,在操作完成时调用它们:

$( ".content_here" ).fadeOut("slow", function(){
    $(this).load("each_article_content.php","id="+id, function(){
        $(this).fadeIn("slow")
    })
})
相关问题