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 on
Use the below example for jquery find to get the first element
More filtring methods With Demo
$(document).ready(function(){
$(".first").first().css("background-color", "green");
});
.first{
padding: 15px;
border: 12px solid #23384E;
background: #28BAA2;
margin-top: 10px;
}
jQuery First Method Example By Tutsmake
This is first() method example
A paragraph in a div.
Another paragraph in a div.
A paragraph in another div.
Another paragraph in another div.
A paragraph in another div.
Another paragraph in another div.