How can you tell if an HTML dropdown is displaying the list of options

Posted by Ross Goddard on Stack Overflow See other posts from Stack Overflow or by Ross Goddard
Published on 2010-06-15T15:49:45Z Indexed on 2010/06/15 15:52 UTC
Read the original article Hit count: 329

Filed under:
|

Is there a way to determine if a given drop down is currently active and displaying it's list of options?

I am currently binding to the mousedown event of the dropdown and populating the options when the user clicks on it. Unfortunately the mousedown event fires when the user selects the option as well.

If I can determine if the drop down is already displaying it's options, then I can skip populating the options.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery