Often I find that as I manipulate the DOM and inject AJAX content, I fill the AJAX content into some copy+pasted HTML fragment, populate it with the new content and then simply $().html() the new code into the DOM... example below illustrates it simply.
$.post(url, {"input1": "postval1", "input2": "postval2"}, function (r) {
if (r.data != undefined) {
$("#element_id").html("<div class='class_a class_b class_c' id='some_id'><a href='" + r.data.href + "'><img src='" + r.data.src + "' /></a></div>");
}}, 'json');
Though it always works great for me, I wonder if this is the most efficient way (least work to browser/quickest) and if it is a standard procedure across the industry?