I'm trying to get the content of a file, and then append something to the body tag like this:
$.get('myfile.php', function(html){
html.find('body').append("<h1>TESTING</h1>");
});
But the above code doesn't work!
I even triend with parseHTML like this:
$.get('myfile.php', function(html){
var parsedHtml = $.parseHTML(html);
parsedHtml.find('body').append("<h1>TESTING</h1>");
});
But that didn't work either.
Any idea please?
TESTING
"); });` – PoorlyWrittenCode Jun 11 '18 at 22:10TESTING
"); ` – Vinit Divekar Jun 12 '18 at 03:01