jQuery: See how many elements a selector matched?

Posted by Rosarch on Stack Overflow See other posts from Stack Overflow or by Rosarch
Published on 2010-05-15T01:19:54Z Indexed on 2010/05/15 1:24 UTC
Read the original article Hit count: 211

If I have a selector like

$.('.active');

How can I see how many items that matched?

Alternatively, is there an easy way to see if more than zero elements were matched?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript