code: function (justVisible) {
              var justVisible = typeof justVisible === 'undefined' ? true : justVisible;
  
              if(justVisible) {
                  var visibleCheckboxes = $("li input[type='checkbox']:not(:disabled)", this.$ul).filter(":visible");
                  visibleCheckboxes.prop('checked', false);
  
                  var values = visibleCheckboxes.map(function() {
                      return $(this).val();
                  }).get();
  
                  $("option:enabled", this.$select).filter(function(index) {
                      return $.inArray($(this).val(), values) !== -1;
                  }).prop('selected', false);
  
                  if (this.options.selectedClass) {
                      $("li:not(.divider):not(.disabled)", this.$ul).filter(":visible").removeClass(this.options.selectedClass);
                  }
              }
              else {
                  $("li input[type='checkbox']:enabled", this.$ul).prop('checked', false);
                  $("option:enabled", this.$select).prop('selected', false);
  
                  if (this.options.selectedClass) {
                      $("li:not(.divider):not(.disabled)", this.$ul).removeClass(this.options.selectedClass);
                  }
              }
          }
docs: Deselects all options.
  
  If justVisible is true or not specified, only visible options are deselected.
  
  @param {Boolean} justVisible