I have a select element in a form, and I want to display something only if the dropdown is not visible. Things I have tried:
- Watching for click events, where odd clicks mean the dropdown is visible and even clicks mean the dropdown isn't. Misses other ways the dropdown could disappear (pressing escape, tabbing to another window), and I think this could be hard to get right cross-browser.
- Change events, but these only are triggered when the select box's value changes.