I have some AJAX call like this:
$.ajax({
type: 'GET',
url: <some url>,
dataType: 'html',
success: function(html){
// do some jQuery on the response html
// like this: $('#someDIV').text();
}
});
The response html likes this:
<html>
<head>
<!-- header things -->
</head>
<div id="someDIV">
content
<div>
</html>
Can I do the query on that response html without append the code to current page?
Simply wrap by jQuery and do the rest.
var $html = $(html);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With