$("div#"+cid+".statusupdate_comment").slideToggle('slow');
$("div#"+cid+".statusupdate_comment").replaceWith(editcomment);
$("div#"+cid+".statusupdate_comment").slideToggle('slow');
how to do this and not lose animation
You've to use cache to that purposes.
You can use addClass and removeClass to customize efects but allways i use jquery cache that is present with all 1.8.x series of MyBB.
solved
$("div#"+cid+".statusupdate_comment").slideToggle("slow", function()
{
$("div#"+cid+".statusupdate_comment").replaceWith(editcomment);
$("div#"+cid+".statusupdate_comment").hide();
});