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();
Related Contents:
- How can I know which radio button is selected via jQuery?
- Get selected text from a drop-down list (select box) using jQuery
- How to get the children of the $(this) selector?
- How can I select an element by name with jQuery?
- How do you remove all the options of a select box and then add one option and select it with jQuery?
- Selecting and manipulating CSS pseudo-elements such as ::before and ::after using javascript (or jQuery)
- Change the selected value of a drop-down list with jQuery
- jQuery to loop through elements with the same class
- jQuery selector regular expressions
- Testing if a checkbox is checked with jQuery
- How do you check if a selector matches something in jQuery? [duplicate]
- How to get all options of a select using jQuery?
- jQuery first child of “this”
- Not class selector in jQuery
- Removing an item from a select box
- jQuery: Check if div with certain class name exists
- jQuery remove options from select
- jQuery’s .bind() vs. .on()
- Check if option is selected with jQuery, if not select a default
- jQuery selector for inputs with square brackets in the name attribute
- Count immediate child div elements using jQuery
- How do I get jQuery to select elements with a . (period) in their ID?
- Check if any ancestor has a class using jQuery
- How to use jQuery to select a dropdown option?
- JQuery .on() method with multiple event handlers to one selector
- Is there a case insensitive jQuery :contains selector?
- jQuery: Select data attributes that aren’t empty?
- jQuery find and replace string
- jQuery : select all element with custom attribute [duplicate]
- JQuery – how to select dropdown item based on value
- “All but not” jQuery selector
- What is the most efficient way to sort an Html Select’s Options by value, while preserving the currently selected item?
- How to get child element by index in Jquery?
- jQuery select a div with a certain class, that doesn’t have another class
- Assign click handlers in for loop
- jQuery function to get all unique elements from an array?
- Get index of clicked element in collection with jQuery
- Why doesn’t jQuery bomb if your selector object is invalid?
- Select all elements that have a specific CSS, using jQuery
- Is there a jQuery selector/method to find a specific parent element n levels up?
- jQuery single selector vs .find()
- How to select empty inputs (value=””) using jQuery
- Difference between $(window).width() vs $(document).width()
- Get value of multiselect box using jQuery or pure JS
- Getting a jQuery selector for an element
- jquery, performance-wise what is faster getElementById or jquery selector?
- In jQuery, is selecting by class or id faster than selecting by some other attribute?
- jQuery – check if an input is not a select field
- JQuery: How to get selected radio button value?
- Store jquery selector in variable