code: function (e) {
          var that = this,
              $el = $(e.target),
              index;
  
          if (!that.dropdownDisabled) {
              that.cancelFocus = true;
              that.el.focus();
  
              while ($el.length && !(index = $el.attr('data-index'))) {
                  $el = $el.closest('.' + that.classes.suggestion);
              }
  
              if (index && !isNaN(index)) {
                  that.select(+index);
              }
          }
      }
docs: Listen for click event on suggestions list: