I am adding nested (reddit-like) comments to my app; so far I'm just using comment
divs, where in my CSS I do this:
.comment {
margin-left: 40px;
}
This works fine for displaying comments. My question is what is the cleanest way to now add reply forms to each comment (and only show it when the user clicks a reply button of some sort)?
Is this usually done by adding all the input boxes for the comments right away, hiding them at first, and then only showing them if the user clicks on a reply button? Or perhaps should I only append the relevant <form>
HTML code to a given div once the user clicks reply for that comment?
What is the cleanest way to do this?