Is there a way to count how many elements on the page with a particular class?
$('.someclass').length
You could also use:
$('.someclass').size()
which is functionally equivalent, but the former is preferred. In fact, the latter is now deprecated and shouldn't be used in any new development.
1.4m articles
1.4m replys
5 comments
57.0k users