Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
120
rated 0 times [  125] [ 5]  / answers: 1 / hits: 16004  / 14 Years ago, mon, january 31, 2011, 12:00:00

How to tell if a drop down has options to select?


More From » jquery

 Answers
4
var hasOptions = !!$('#theSelect option').filter(function() { return !this.disabled; }).length;


maybe? This looks for <option> elements that are not disabled.


[#93967] Saturday, January 29, 2011, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
zahrafrancisr

Total Points: 176
Total Questions: 105
Total Answers: 99

Location: Svalbard and Jan Mayen
Member since Sun, Sep 25, 2022
2 Years ago
;