How do I check, using jQuery, how many options are there in a drop down menu?
Thanks.
var length = $('#mySelectList').children('option').length;
or
var length = $('#mySelectList > option').length;
This assumes your <select>
list has an ID of mySelectList
.