I'm trying to display some javascript
within pre/code tags using jQuery
text()
method. Like this:
jQuery(".output").wrapInner( "<pre><code></code></pre>" );
jQuery(".output code").text("<script type='text/javascript' src='http://somedomain/?" + apiKeyValue.val() + "></script>");
However the script tags produce a
Uncaught SyntaxError: Unexpected token ILLEGAL
error in the console. How can I display the script tags?