I\'m on page A. A link is clicked, and I\'m loading in the DOM via jQuery get from page B. Inside page B\'s DOM are multiple dynamically-generated script tags with the class
If you load the AJAX result like this:
function (data) {
// the result is loaded in the variable 'data'
}
And then push it into a div like this:
function (data) {
$("#someDiv").text(data);
}
The entire page including html tags will be placed as text so you can see the tags. You could trim the page to get only the scripts you want, but ask yourself is it is clever to do so.
The thing is... if you just save the script as an external .js file you could load it in ajax as text :)