I would like to isolate a part of my responseText in Jquery and Ajax.
$.ajax ({
url : "/controller/action",
complete : function (xhr, result)
{
if (result != "success") return;
var response = xhr.responseText;
var title = $(response).find("p");
title.appentTo ("#description");
}
});
I works great for response
but doesn't when I try to isolate the part between
.find("p")
?
Seems like you have to correct some typos, but I don't agree entirely with the suggestion. To me it should be:
[note that the tile is inside $()] cause appendTo can accept selectors too