Ok this is really frusturating me because I\'ve done this a hundred times before, and this time it isn\'t working. So I know I\'m doing something wrong, I just can\'t figur
Wanting to do the same thing and knowing that JQuery load(..) does it, I had a look in the code. While you can't turn a complete html response directly into a JQuery object, you can append it to one so:
function(data, textStatus, xhr) {
$(target).html(jQuery("").append(data).find("#snippet"));
// Create a dummy div to hold the results,
// inject the contents of the document into it,
// Locate the specified elements
}
The response from the server that goes into data is like:
...
Some content here that we are interested in