Hi,
I am getting html code dynamically from database and showing the content through js .pretty print script is not working when i keep script in html page.Below is the code:
index.html:
<script type='text/javascript' src="js/display.js"></script>
display.js:
contentHtml += '<pre class="prettyprint tryit linenums">'+ arBody +'</pre>';
But if I keep a pretty print class in HTML pretty print function is working and the code is highlighting.
index.html:
<script type='text/javascript' src="js/display.js"></script>
<pre class="prettyprint tryit linenums">
<p>hii</p>
</pre>