Typically, the text to display for a JQuery Dialog is put in a hidden div, and then called with $("#cs0").dialog();.
However, if the text to display is HTML code, such as:
<div id="cs0">
<a href="http://www.mysite.com/">
<img border="0" alt="MySite" src="http://www.mysite.com/images/buttons/mybutton.jpg" />
</a>
</div>
The dialog does not display it literally. How to have the dialog display the div content, explicitly, rather than its execution?
See: http://jsfiddle.net/DqgGH/2/
P.S.
I tried:
$("<div><a href="http://www.mysite.com/"><img border="0" alt="Convert-Kit" src="http://www.mysite.com/images/buttons/mybutton.jpg" /></a></div>").dialog();
but it does not work !!!
One way to output it as raw HTML is to set the contents of the div using
text().HTML:
Javascript: