jQuery is() Method
jQuery is() Method
The is() method is used to check if one of the selected elements matches the selectorElement. In other words, it verifies whether element present inside of it is equal to the jQuery selector element or not.
Syntax:-
Its syntax is:- $(selector).is(selectorElement,function(index, element))
Further Explanation:-
Parameter | Description |
---|---|
selectorElement | Required. Specifies a selector expression, element, or a jQuery object to match the current set of elements against. |
function(index,element) |
Optional. Specifies a function to run for the group of selected elements.
|