.is() is the testing method of the jQuery filtering family. Unlike .filter(), which returns a new jQuery object, .is() returns a boolean — true if at least one element in the set matches the argument, false otherwise. It does not change the selection.
Common Use Cases
Use .is() in conditional logic: checking if a clicked element is of a certain type, whether a form field is required, or whether a panel is currently visible before triggering an animation.
Arguments
.is() accepts the same argument types as .filter(): a selector string, an element or jQuery object for direct comparison, or a function with the same index/element signature.
.is(':visible')— true if element is displayed.is(':checked')— true if checkbox is checked.is('a')— true if element is an anchor tag.is(this)— identity comparison.is(function(i, el){ return ... })— functional test
Event delegation relies heavily on .is() internally — when jQuery checks whether a bubbled event target matches the delegated selector. You can use it explicitly for the same purpose in custom delegation logic.