You can use the :selected
selector to select them, then get the .length
, like this:
var count = $("#mySelect :selected").length;
You can get the number of selected items in the multiselect with the following:
$('#selectList :selected').length
Where #selectList is the id of your .
var n = $("input:checked").length;
see this for more detail:
http://api.jquery.com/checked-selector/
For checkboxes I'm using:
$('input[name="InputName"]:checked').size()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With