Latex not render when string call from javascript?
<p>In my below code:</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>function test() {
 document.getElementById('demo').innerHTML="$$\left[ x=0 \right] $$";//same code from demo1.but not rendered

}
test();</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script type="text/javascript" src="http://latex.codecogs.com/latexit.js"&gt;&lt;/script&gt;

&lt;p lang="latex"id="demo"&gt;&lt;/p&gt;
&lt;p lang="latex"id="demo1"&gt;$$\left[ x=0 \right] $$&lt;/p&gt;</code></pre>
</div>
</div>
</p>

<p>Same code applied from javascript. Its not rendering.kindly tell Whats wrong with my code &amp; correct my code or give any alter suggestion for that .</p>

<p>Thanks in advance</p>