DOM更改后计算元素

so currently using ajax with JQuery .post to return a form populate with some values. What I am trying to do is basically identify if the content contains checkboxes using:

var count = $('#form').find('checkbox').length;
alert(count);

however even when it does contain checkboxes the output is 0. So do I have the syntax wrong or is it something to do with the fact the checkboxes weren't in the original DOM?

many thanks,

There is no tag checkbox, you will need to use the :checkbox docs selector

$('#form').find(':checkbox').length;

or the more verbose

$('#form').find('input[type="checkbox"]').length;