Proper mechanism to add elements using jQuery
<p>I'm using jQuery to add elements dynamically to a dropdown but I think I'm mixing syntaxes and would like to go pure jQuery.  Currently I'm doing this:</p>

<p><code>$("#data-source-menu").addClass("menu-container")
                       .html($("&lt;ul class=\"popup-menu\" id=\"dataset-menu\"&gt;&lt;\/ul&gt;"));</code></p>

<p>Then later</p>

<p><code>$("#dataset-menu").append($("&lt;div&gt;" + dataset.label + "&lt;\/div&gt;").addClass("menu-item").attr(dataset));</code></p>

<p>It's that inner building of the html I don't like.  Is there a more abstract way to approach this that doesn't involve writing html?  Something like JavaScript's <code>document.createTextNode("Hello")</code>?</p>
