docs: function(element) {
              if ($(element).is(':selected')) {
                  $(element).prop('selected', true);
              }
  
              // Support the label attribute on options.
              var label = this.options.label(element);
              var value = $(element).val();
              var inputType = this.options.multiple ? "checkbox" : "radio";
  
              var $li = $(this.options.templates.li);
              $('label', $li).addClass(inputType);
              $('label', $li).append('<input type="' + inputType + '" name="' + this.options.checkboxName + '" />');
  
              var selected = $(element).prop('selected') || false;
              var $checkbox = $('input', $li);
              $checkbox.val(value);
  
              if (value === this.options.selectAllValue) {
                  $li.addClass("multiselect-item multiselect-all");
                  $checkbox.parent().parent()
                      .addClass('multiselect-all');
              }
  
              $('label', $li).append(" " + label);
  
              this.$ul.append($li);
  
              if ($(element).is(':disabled')) {
                  $checkbox.attr('disabled', 'disabled')
                      .prop('disabled', true)
                      .parents('a')
                      .attr("tabindex", "-1")
                      .parents('li')
                      .addClass('disabled');
              }
  
              $checkbox.prop('checked', selected);
  
              if (selected && this.options.selectedClass) {
                  $checkbox.parents('li')
                      .addClass(this.options.selectedClass);
              }
          }