src/utils/DropdownEventHandler.js
function DropdownEventHandler($list, selectionCallback, closeCallback) {

        this.$list = $list;
        this.$items = $list.find("li");
        this.selectionCallback = selectionCallback;
        this.closeCallback = closeCallback;
        this.scrolling = false;

        /**
         * @private
         * The selected position in the list; otherwise -1.
         * @type {number}
         */
        this._selectedIndex = -1;
    }
function DropdownEventHandler($list, selectionCallback, closeCallback) {

        this.$list = $list;
        this.$items = $list.find("li");
        this.selectionCallback = selectionCallback;
        this.closeCallback = closeCallback;
        this.scrolling = false;

        /**
         * @private
         * The selected position in the list; otherwise -1.
         * @type {number}
         */
        this._selectedIndex = -1;
    }
function DropdownEventHandler ( $list , selectionCallback , closeCallback ) { this . $list = $list ; this . $items = $list . find ( "li" ) ; this . selectionCallback = selectionCallback ; this . closeCallback = closeCallback ; this . scrolling = false ; /**
         * @private
         * The selected position in the list; otherwise -1.
         * @type {number}
         */ this . _selectedIndex = - 1 ; }
Object to handle events for a dropdown list.

DropdownEventHandler handles these events:

Mouse:
- click       - execute selection callback and dismiss list
- mouseover   - highlight item
- mouseleave  - remove mouse highlighting

Keyboard:
- Enter       - execute selection callback and dismiss list
- Esc         - dismiss list
- Up/Down     - change selection
- PageUp/Down - change selection

Items whose <a> has the .disabled class do not respond to selection.

@constructor
@param {jQueryObject} $list  associated list object
@param {Function} selectionCallback  function called when list item is selected.
Object to handle events for a dropdown list .