I’m trying to create a similar comments system to YouTube. What would be the easiest way of making a reply textarea appear under a comment when the button is clicked? I assume duplicating the textarea and making it display:none for each comment is not necessary.
With textarea
<div class="comment">
<p>Bla bla</p>
<a hred="" id="reply">Reply</a>
<textarea class="reply"></textarea>
</div>
Without textarea
<div class="comment">
<p>Bla bla2</p>
<a hred="" id="reply">Reply</a>
</div>
jQuery
$('#reply').click(function(){
}
Something like
should do the job.