E.g:
with only one container div :
<div id="container1">
<ul>
<li>I am not part of update </>
<li> ID fo container 1</li>
</ul>
</div>
and when I adding new one div dynamic, I want them to be:
<div id="container1">
<ul>
<li>I am not part of update </>
<li> ID of container 1</li>
<li> ID of container 2 was added here </li>
</ul>
</div>
<!-- container 2 should has both ID of container 1 and 2 -->
<div id="container2">
<ul>
<li>I am not part of update </>
<li> ID of container 1</li>
<li> ID of container 2 was added here </li>
</ul>
</div>
It means when I create new container, the new created container ID should be adding to the previous containers.
And another problem is how to update the ID list of container when I remove container.E.g:
when I remove container1 , the ID list container should be updated to :
<div id="container2">
<ul>
<li>I am not part of update </>
<!-- ID of container 1 had been remove -->
<li> ID of container 2 was added here </li>
</ul>
</div>
Thank you very much!!
HTML structure you want is something like this:
Adding a new container:
Removing a container: