Any idea why the piece of code below does not add the script element to the DOM?
var code = \"\"; $(\"#someElement\").append(cod
Can try like this
var code = "" is because the string isn't allowed inside javascript because the DOM layer can't parse what's js and what's HTML.
var code = ""