Creating elements in JavaScript
<p>I have a lot of JavaScript code that creates HTML. For example:</p>

<pre><code>function Reply(postId) {
    if (!document.getElementById("reply" + postId)) {
        $("#root" + postId).after("&lt;div id='reply" + postId + "'&gt;&lt;textarea cols='70' rows='8' style='margin-bottom: 10px'&gt;&lt;/textarea&gt;&lt;br/&gt;&lt;span style='margin-bottom: 30px'&gt;&lt;input type='button' value='Submit' /&gt;&lt;input type='button' value='Cancel' onclick='$(\"#reply" + postId + "\").remove();'/&gt;&lt;/span&gt;&lt;/div&gt;");
    }
}
</code></pre>

<p>How can I use jQuery to make this more readable? What's the best way to go about making new elements in JavaScript? Can I see an example?</p>
