Add Jquery ui button dynamically
<p>I have a javascript function that removes the existing buttons and adds new ones instead.</p>

<p>Here is the code:</p>

<pre><code> function FunctionName(){
     ("button").remove();
     // This works fine.
     //but however, with the following add code, I don;t get a jquery ui button.
     var element  = document.createElement("input");
     element.setAttribute("type","button");
     // other code
     divName = get &lt;div&gt; by ID;
     divName.appendChiled(element);
 }
</code></pre>

<p>Is there any way to add a jquery ui button dynamically:</p>

<p>like:</p>

<p><code>divName.add("button");</code></p>

<p>It did not work...</p>
