jQuery - Using multiple Input

jQuery - Using multiple Input

I am trying to set focus to the first checkbox or text box on the page. Some pages have text boxes at the top, and others have check boxes.

The following is the code I am using for the first text box, however it I require the possibility to use checkbox or text.

$(function() {
    $("#divId :input[type='text']:first).focus();
});

Can someone help me please?