Need javascript for incrementation...
I have two with class names, parent and child (child inside the parent).
Each has a button outside them. If I click the button outside the parent, the div should be incremented with child inside it.
And if the button outside the child is clicked, the child div must be incremented.
Find the below link as demo. LINK
HTML code is
<div class="parent">
<div class="child">
</div><br>
<a href="#" class="inc-child">Add one more child</a>
</div><br>
<a href="#" class="inc-parent">Add one more Parent</a>