My ajax request is returning an object with my HTML inside it, I want to count the divs in this object, just can't figure out how.
Some code:
$.ajax({
type: "GET",
url: "/activity_results.html?"+options,
cache: false,
success: function(html, status){
if(html != ""){
$(html).appendTo("#comments");
alert(($(html)).length);
}
}
});
In the alert I am showing the length of the whole HTML object but I want to really be drilling down into it and showing the length of a specific set of divs.