Sorry for the amateur question but I am still trying to get used to JS. How can I read the text from a drop down using java script when I have multiple classes in html. Any help will be appreciated. thanks
HTML
<div class="field">
<select id="addition_membership_type" class="w230" name="booking.additional_frequentFlyerMembershipType" style="display: none;" aria-disabled="false">
<option class="hide-from-ui-list" value=""> … </option>
<option value="IBP"> … </option>
<option value="JET"> … </option>
</select>
<a id="addition_membership_type-button" class="ui-selectmenu ui-widget ui-state-default ui-selectmenu-dropdown w230 ui-corner-all" aria-owns="addition_membership_type-menu" aria-haspopup="true" tabindex="0" href="#" role="button" style="width: 230px;" aria-disabled="false">
<span class="ui-selectmenu-status">
Jet Privilege
</span>
Javascript
<script>
$(document).ready (function()
{
var dropdown = $(".field", "#addition_membership_type").text();
if (dropDown == "JET")
{
window.alert();
}
});
</script>