Insert new template after click add button

I have a UL template and Li template.
inside UL template will have multiple Li template which is fine.
how can I dynamically insert another Li template into UL template after click some Add button please?