To add nodes dynamically in jquery
<pre><code>&lt;li&gt;
&lt;input type="checkbox" name="post_category[]" id="post_category" value="1"&gt;
parent1(category_names)
&lt;/li&gt;
&lt;li&gt;
&lt;input type="checkbox" name="post_category[]" id="post_category" value="2"&gt;
&amp;nbsp;child1 of parent1
&lt;/li&gt;
&lt;li&gt;
&lt;input type="checkbox" name="post_category[]" id="post_category" value="3"&gt;
&amp;nbsp;child2 of parent1
&lt;/li&gt;
</code></pre>

<p>category names are listed in tree view. The value of checkbox contains id of category</p>

<p><strong>Question:</strong>
*<em>I need to add category in this list dynamically</em>*</p>

<p>i got new_category name, parent_category_id from user.
I need to add category as same format below the parent </p>
