title: How to create a JQuery UI Dialog to display a HTML code snippet?
body: <p>Typically, the text to display for a JQuery Dialog is put in a hidden <code>div</code>, and then called with <code>$("#cs0").dialog();</code>.</p>
  
  <p>However, if the text to display is HTML code, such as:</p>
  
  <pre><code>  &lt;div id="cs0"&gt;
      &lt;a href="http://www.mysite.com/"&gt;
        &lt;img border="0" alt="MySite" src="http://www.mysite.com/images/buttons/mybutton.jpg" /&gt;
      &lt;/a&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>The dialog does not display it literally. How to have the dialog display the <code>div</code> content, explicitly, rather than its execution?</p>
  
  <p>See: <a href="http://jsfiddle.net/DqgGH/2/" rel="nofollow">http://jsfiddle.net/DqgGH/2/</a></p>
  
  <p><strong>P.S.</strong></p>
  
  <p>I tried:</p>
  
  <pre><code>$("&lt;div&gt;&lt;a href="http://www.mysite.com/"&gt;&lt;img border="0" alt="Convert-Kit" src="http://www.mysite.com/images/buttons/mybutton.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;").dialog();
  </code></pre>
  
  <p>but it does not work !!!</p>