How do I count the number of s in a DOM element using jQuery?
$('#input1 option').length;
This will produce 2.
2
Another approach that can be useful.
$('#select-id').find('option').length