Posted By: Dan
Any idea why the piece of code below does not add the script element to the DOM?
var code = "<script></script>"; $("#someElement").append(code);
I’ve seen issues where some browsers don’t respect some changes when you do them directly (by which I mean creating the HTML from text like you’re trying with the script tag), but when you do them with built-in commands things go better. Try this:
From: JSON for jQuery