How to determine the type of object is a flag or something else.
You can use the method is:
is
if ($(this).is(":checkbox")) { // is checkbox } else { // not checkbox }
You can check its type attribute. Using jQuery:
if($('input').attr('type') == 'checkbox') { // do if checkbox } else { // do if not checkbox }
$(element).attr('type') == 'checkbox'
You can use:
$("input[type='checkbox']").whatever();