Text of a Selected Item in a dropdown list [Solved]
I am stuck on this code, and don't know what to do.
I have a drop down list with 1400 items. When the user selects a checkbox, I want to populate two fields on the page. 1 will have the text label of the item, and one the value of the item. I know how to do the populating of the fields.
What I need help with getting the text label of the field.
FYI: The class on the dropdown list is called ddl. I am using that to reference the drop down list.
If I do this:
-
var id = $('.ddl').val();
I get the value of the selected item.
How can get the text displayed with that item in the dropdown list?
Thanks,
Andy