How to know the type of an object is checkbox in jquery?

jquery

Solution

You can use `is` method:

if ($(this).is(":checkbox")) {
    // is checkbox
} else {
    // not checkbox
}

Problem

How to detect type of object is 'checkbox' or something else.

Original source