To get the current value is very simple using val()
.
JavaScript: $(‘#selectList’).val();
But sometimes you may need to get the selected option’s text. This is not as straight forward. First, we get the selected option with :selected
selector. Then once we have the option, we can get the text with the function, text()
.
JavaScript: $(‘#selectList :selected’).text();
All credits to :http://marcgrabanski.com/article/jquery-select-list-values