Question

Can I ask what the function is of .is and .filter in jQuery, and what is their difference?

Was it helpful?

Solution

.is() returns true if at least one of the elements you're calling it on matches the selector.

.filter() returns only those elements from the set you're calling it on which match the selector

The proper definitions and examples can be found at: .is() and .filter()

Hope that helps..?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top