Skip to content

From 'DeselectOption' to Select All Option #29

@borjakhet

Description

@borjakhet
      Selectr.DeselectOption = function(opt) {
        var currentSelectionCount, el;
        el = $(opt).parents('.selectr').prev();
        $(opt).parents('.selectr').removeClass('max-selection-reached');
        $(opt).removeClass('selected');
        $("option[value=" + ($(opt).data('val')) + "]", el).prop('selected', false);
        currentSelectionCount = $('option:selected', el).length;
        $('.current-selection', $(opt).parents('.selectr')).text(currentSelectionCount > 0 ? currentSelectionCount : '');
        return this.TriggerChange(el);
      };

This funcions deselect all the options.

How would like to change this functionality to select all options . Can someone give me a hand?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions