Create element using JavaScript and jquery
<p>Suggest a better way to do the following in jquery . also give me the native js code to do it</p>

<pre><code>$('&lt;div id="dialog-confirm" title="'+confirmbox.title+'"&gt;&lt;p&gt;&lt;span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"&gt;&lt;/span&gt;'+confirmbox.message+'&lt;/p&gt;&lt;/div&gt;')
.appendTo('body');
</code></pre>

<p>Why the need. look at "Idiomatic Syntax for Creating Elements" section of this link <a href="http://stackoverflow.com/tags/jquery/info">http://stackoverflow.com/tags/jquery/info</a></p>
