Chrome Extension

Get selected option text using jQuery

The code can be used to get the text of the selected option using jQuery.
var selected_text = $("select option:selected").text();
console.log(selected_text);

$(document).on("change", "select", function() {
    var option_text = $('option:selected', this).text();
    console.log(option_text);
});
We are a bunch of lazy programmers so we developed this chrome extension
search code from your favorite search engine
Install Now
Was this helpful?
0 Comments
Open Code Manager We are hiring