Quick Answer
jQuery filtering: .filter(selector) narrows a jQuery set to matching elements; .not(selector) excludes matching elements; .has(selector) keeps elements with matching descendants; .first()/.last() take the first/last element; .eq(index) takes the element at an index. These refine a selection without querying the DOM again.
Answer
Filtering methods:
• .filter() – return elements matching condition • .not() – exclude elements • .first(), .last(), .eq(index) – specific element filtering
Useful for precise DOM selection.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.