I am writing $(this).closest('.comment').find('form').toggle('slow'); and the problem is each of the forms in the child is being toggled. I would like only the first form to be toggled. the html is something like the below and this is the a link
$(this).closest('.comment').find('form').toggle('slow');
<div comment> <a href> <form> </form> <a href> <div comment> <form> </form> </div> </div>
You can use either
$(this).closest('.comment').find('form').eq(0).toggle('slow');
or
$(this).closest('.comment').find('form:first').toggle('slow');
1.4m articles
1.4m replys
5 comments
57.0k users