docs: function (type) {
        var that = this,
          texts = [],
          labels = [],
          values = [];
        this.$drop.find(sprintf('input[%s]:checked', this.selectItemName)).each(function () {
          texts.push($(this).parents('li').first().text());
          labels.push($(this).parents('li').attr('label') || '');
          values.push($(this).val());
        });
  
        if (type === 'text' && this.$selectGroups.length) {
          texts = [];
          this.$selectGroups.each(function () {
            var html = [],
              text = $.trim($(this).parent().text()),
              group = $(this).parent().data('group'),
              $children = that.$drop.find(sprintf('[%s][data-group="%s"]', that.selectItemName, group)),
              $selected = $children.filter(':checked');
  
            if (!$selected.length) {
              return;
            }
  
            html.push('[');
            html.push(text);
            if ($children.length > $selected.length) {
              var list = [];
              $selected.each(function () {
                list.push($(this).parent().text());
              });
              html.push(': ' + list.join(', '));
            }
            html.push(']');
            texts.push(html.join(''));
          });
        } else if (type === 'label' && this.$selectGroups.length) {
          labels = [];
          this.$selectGroups.each(function () {
            var html = [],
              label = $.trim($(this).attr('label') || ''),
              group = $(this).parent().data('group'),
              $children = that.$drop.find(sprintf('[%s][data-group="%s"]', that.selectItemName, group)),
              $selected = $children.filter(':checked');
  
            if (!$selected.length) {
              return;
            }
  
            html.push('[');
            html.push(label);
            if ($children.length > $selected.length) {
              var list = [];
              $selected.each(function () {
                list.push($(this).attr('label') || '');
              });
              html.push(': ' + list.join(', '));
            }
            html.push(']');
            labels.push(html.join(''));
          });
        }
  
        switch (type) {
          case 'text':
            return texts;
          case 'label':
            return labels;
          default:
            return values;
        }
      }