I've got an ajax request that fetches an HTML string, like:
<div class="video">...</div><div class="video">...</div>
and I want to count the number of "video" div's as soon as I retrieve the HTML from the server. Is there an easy way to do this?
I tried:
.done(function(data) {
$(data).find('.video').length
but it returns 0.