I would like to see if the selected menu item has been selected or displayed.
I tried
jQuery("#dropdownID option[value='selectionKey']").change(function() { if (jQuery("#dropdownID option[value='selectionKey']").attr('selected', 'selected')) DoSomething(); else DoSomethingElse(); });
and
jQuery("#dropdownID").change(function() { if (jQuery("#dropdownID option[value='selectionKey']").attr('selected', 'selected')) DoSomething(); else DoSomethingElse(); });
but not one of the blocks starts, changing the selection in the drop-down menu. That is, it never gets into the if statement.
source share