Hi there
I know I can get the value using $("#dropdown").val()
does anybody know how i get the label?
Cheers
Hi there
I know I can get the value using $("#dropdown").val()
does anybody know how i get the label?
Cheers
var text = $("#dropdown").find("option:selected").text();
which is the same as
var text = $("#dropdown option:selected").text();
Use the :selected selector (to get the selected <option>) and get the .text(), for example:
$("#dropdown :selected").text()