I evaluated data string inside .get function:
$.get(url, function(data) {
var divHtml = $(data).find("#comments-comments").html();
})
data is a returned page like that:
"< !DOC TYPE html >\r\n\r\n< html ... < / body >\r\n\r\n< / html >"
But divHtml doesn't give the div I am interested.
var divHtml = $(data).find("#comments-comments").html(); // data is the string above.
How can I evaluate #comments-comments div?
Thanks.
Note: I purposefully inserted spaces inside the string since stackoverflow didn't show original string.