19
Dec
Learn how to use jquery .is() function
.is( selector ) returns Boolean. That means returns true or false.
.is( selector ) selectorA string containing a selector expression to match elements against.
.is( function(index) ) function(index)A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element.
.is( jQuery object ) jQuery objectAn existing jQuery object to match the current set of elements against.
.is( element ) elementAn element to match the current set of elements against.