// fadeIn + replaceWith $("#posts_insert").replaceWith(function() { return $(html).hide().fadeIn(); }); // https://stackoverflow.com/questions/6323868/jquery-ajax-using-fadein-replacewith