Skip to main content

.is()

.is(String selector): Boolean

Checks if any of the selected Elements match the selector

console.log( 'Class name: ', $( "div" ).is('.class-name') );
console.log( 'Pseudo selector: ', $( "div" ).is(':first-child') );