Possible duplicate:
Is there a way to determine if the <select> dropdown menu is open?
My client would like me to display some simple instructions when the user interacts with our <select> element so that the <option> list falls out (or "pops up," I suppose, as some browsers open up if the <select> box <select> not much space). And then the instructions should disappear again as soon as the user either makes a new choice, and thus leads to the disappearance of the list of options or simply closes the list of options without making any changes.
I thought that I was pretty good at using CSS / CSS3 selectors and jQuery events so things like <div> instructions would appear and disappear, but for this case itβs hard for me to understand if there is a way to indicate when the <select> field is not just βactiveβ or βfocusedβ - both of them can be true as long as the selection field is still closed and does not display its list of parameters, but actually opens. None of the CSS pseudo-selectors or jQuery events that I tested allow me to "see", much less react to the state of openness or closedness of the <select> window.
Does anyone know how I can set a trigger or write a CSS rule that depends on whether a list of options is currently being displayed?
Brandon rhodes
source share