$('.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.
More Related Contents:
- jQuery UI: Datepicker set year range dropdown to 100 years
- How to remove css property in jQuery
- Jquery to change form action
- CSS3 equivalent to jQuery slideUp and slideDown?
- How to listen to when a checkbox is checked in Jquery
- Get Selected value from Multi-Value Select Boxes by jquery-select2?
- How to use placeholder as default value in select2 framework
- Recommended jQuery templates for 2012? [duplicate]
- JQuery DatePicker ReadOnly
- Character countdown like on twitter
- How to exclude an element from being dragged in sortable list?
- how to fetch array keys with jQuery?
- Uncaught TypeError: Object [object Object] has no method ‘dialog’
- Select2: How to prevent tags sorting
- Select2 v4 how to paginate results using AJAX
- fire an event from one view to another in backbone
- How to retrieve JSON via ASP.Net context.Request
- link_to and remote => true + jquery : How? Help?
- jQuery Toggle State
- delayed addclass/remove class function not working
- jquery ajax load certain div
- understanding $ vs. jQuery in iife instead of $
- jQuery toggle class
- Click the poster image the HTML5 video plays?
- HTTPS and external (CDN) hosted files?
- JQuery Datepicker – no default date
- jQuery remove tag from HTML String without RegEx
- How to programmatically select selectables with jQuery UI?
- Chrome file upload bug: on change event won’t be executed twice with the same file
- What is alternative to use after jQuery 1.9 removed .toggle(function,function)?