JQuery examples
Combobox
Selected text
Q: How can I get a dropdownlist/combobox selected text in jQuery?
A: There are several possibilities:
- The most simple solution, but imho very difficult to remember.
$("#yourdropdownid option:selected").text(); - A more optimized way.
$("#yourdropdownid option").is("selected").text() - One stated this is the fastest.
$("#yourdropdownid").children("option").is("selected").text() - One stated is() should not be used because it is a boolean whether selected or not.
$("#yourdropdownid").children("option").filter(":selected").text()