If you’d like to get the option with a value of 2, use
$("#list option[value="2"]").text();
If you’d like to get whichever option is currently selected, use
$("#list option:selected").text();
More Related Contents:
- How to get the children of the $(this) selector?
- Get selected text from a drop-down list (select box) using jQuery
- How do I get jQuery to select elements with a . (period) in their ID?
- jQuery selectors on custom data attributes using HTML5
- How can I get selector from jQuery object
- Select all elements that have a specific CSS, using jQuery
- Removing an item from a select box
- jQuery DOM changes not appearing in view source
- Testing if a checkbox is checked with jQuery
- jQuery : select all element with custom attribute [duplicate]
- How to use jQuery to select a dropdown option?
- Selecting multiple classes with jQuery
- How do you check if a selector matches something in jQuery? [duplicate]
- Not class selector in jQuery
- jQuery single selector vs .find()
- What is the most efficient way to sort an Html Select’s Options by value, while preserving the currently selected item?
- jQuery select and wrap textNode
- Using jQuery to search a string of HTML
- How to keep cascade dropdownlist selected items after form submit?
- Count immediate child div elements using jQuery
- jQuery find and replace string
- How to get text node after element?
- jQuery support “:invalid” selector
- jQuery remove options from select
- Combine two selectors with one jQuery object
- How to select empty inputs (value=””) using jQuery
- How to hide optgroup/option elements?
- What is the new proper way to use a child selector with a context node in jQuery?
- jQuery: Select data attributes that aren’t empty?
- Can you have multiple lines in an element?