How to escape quotes inside an inline javascript function
<p>My function is running perfectly without using class in appended <code>div</code> but when I try to add a <code>class</code> on the element it is not working.</p>

<pre><code>&lt;head&gt;
    &lt;script type="text/javascript"&gt;
        function showt(id){
            $('body').append(id)
        }
    &lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
    &lt;a href="#" id="hidemain" onmouseover='showt("&lt;div class='sdf'&gt;appended&lt;/div&gt;")'&gt;show detail&lt;/a&gt;
&lt;/body&gt;
</code></pre>
