Re:Select2 - A better way to make select boxes (with jQuery)
by WiseWeasel on Friday June 08, 2012 @04:06PM
(#4085948)
Oh right... I somehow forgot that pulldown menus can be used as their name implies, by clicking and holding down the mouse to open the menu, and release to make your selection; I've gotten so used to clicking to open, having them stay open, and then clicking again to make my selection (at least since Apple first enabled that feature in System 7). All of a sudden, I'm much less proud of my home-rolled pulldown-menu implementation I've been using.
I just tried binding .open() to the mousedown event and .close() to the mouseup event and it seems to work for that use case, but it still has to know to behave in the other way (open on mousedown, but don't always close on mouseup).