code: function(container, items, settings) {
              this.$container = $(container);
  
              // Param mapping
              if (typeof items === 'undefined' && $.isPlainObject(container)) {
                  // (settings)
                  settings = container;
                  container = null;
                  items = null;
              }
              else if (typeof settings === 'undefined' && $.isPlainObject(items)) {
                  // (container, settings)
                  settings = items;
                  items = null;
              }
  
              // Is this already a select?
              if (this.$container.data('select')) {
                  Garnish.log('Double-instantiating a select on an element');
                  this.$container.data('select').destroy();
              }
  
              this.$container.data('select', this);
  
              this.setSettings(settings, Garnish.Select.defaults);
  
              this.$items = $();
              this.$selectedItems = $();
  
              this.addItems(items);
  
              // --------------------------------------------------------------------
  
              if (this.settings.allowEmpty && !this.settings.checkboxMode) {
                  this.addListener(this.$container, 'click', function() {
                      if (this.ignoreClick) {
                          this.ignoreClick = false;
                      }
                      else {
                          // Deselect all items on container click
                          this.deselectAll(true);
                      }
                  });
              }
          }
docs: Constructor