i m doing a ajax call with which i m getting data (html) which is having the structure
<li>
<div class="min-height">
<a href="auser.jsp?id=7"><img src="dir/image_759.jpeg"alt="image" /></a><br />
sumit jha
</div>
</li>
Now before adding it the dom i want to count the number of li 's in the html
as for example
$.ajax( {
type: "POST",
url: "more_people.jsp",
data: ({last_id: last_id }),
cache: false,
success: function(html)
{
$li = html;
console.log ( $li.html().children().length );
}
});
How do i do??
thanks