$.ajax({ url: content + ".htm", async: true, dataType: "html" }).success(function(htmlDoc){ //in here var body = $("body", htmlDoc) //doesnt work } //htmlDoc content