jquery get selected dropdownlist text
- by mike
Hi How can i get the selected text on a dropdowm, ive seen examples of how to do eg
$('select option:selected').text()
but looking at my code below, how can i modify it to work as the line
alert($(this).parent().text());
gets all the list items as opposed to selected text
$(document).ready(function () {
$('.mutuallyexclusive').live("click", function () {
checkedState = $(this).attr('checked');
$('.mutuallyexclusive:checked').each(function () {
$(this).attr('checked', false);
});
$(this).attr('checked', checkedState);
alert($(this).parent().text());
});
});