public/js/multiselect.min.js
function() {
            var alreadyHasSelectAll = this.hasSelectAll();

            if (!alreadyHasSelectAll && this.options.includeSelectAllOption && this.options.multiple
                    && $('option', this.$select).length > this.options.includeSelectAllIfMoreThan) {

                // Check whether to add a divider after the select all.
                if (this.options.includeSelectAllDivider) {
                    this.$ul.prepend($(this.options.templates.divider));
                }

                var $li = $(this.options.templates.li);
                $('label', $li).addClass("checkbox");
                $('label', $li).append('<input type="checkbox" name="' + this.options.checkboxName + '" />');

                var $checkbox = $('input', $li);
                $checkbox.val(this.options.selectAllValue);

                $li.addClass("multiselect-item multiselect-all");
                $checkbox.parent().parent()
                    .addClass('multiselect-all');

                $('label', $li).append(" " + this.options.selectAllText);

                this.$ul.prepend($li);

                $checkbox.prop('checked', false);
            }
        }
function() {
            var alreadyHasSelectAll = this.hasSelectAll();

            if (!alreadyHasSelectAll && this.options.includeSelectAllOption && this.options.multiple
                    && $('option', this.$select).length > this.options.includeSelectAllIfMoreThan) {

                // Check whether to add a divider after the select all.
                if (this.options.includeSelectAllDivider) {
                    this.$ul.prepend($(this.options.templates.divider));
                }

                var $li = $(this.options.templates.li);
                $('label', $li).addClass("checkbox");
                $('label', $li).append('<input type="checkbox" name="' + this.options.checkboxName + '" />');

                var $checkbox = $('input', $li);
                $checkbox.val(this.options.selectAllValue);

                $li.addClass("multiselect-item multiselect-all");
                $checkbox.parent().parent()
                    .addClass('multiselect-all');

                $('label', $li).append(" " + this.options.selectAllText);

                this.$ul.prepend($li);

                $checkbox.prop('checked', false);
            }
        }
function ( ) { var alreadyHasSelectAll = this . hasSelectAll ( ) ; if ( ! alreadyHasSelectAll && this . options . includeSelectAllOption && this . options . multiple && $ ( 'option' , this . $select ) . length > this . options . includeSelectAllIfMoreThan ) { // Check whether to add a divider after the select all. if ( this . options . includeSelectAllDivider ) { this . $ul . prepend ( $ ( this . options . templates . divider ) ) ; } var $li = $ ( this . options . templates . li ) ; $ ( 'label' , $li ) . addClass ( "checkbox" ) ; $ ( 'label' , $li ) . append ( '<input type="checkbox" name="' + this . options . checkboxName + '" />' ) ; var $checkbox = $ ( 'input' , $li ) ; $checkbox . val ( this . options . selectAllValue ) ; $li . addClass ( "multiselect-item multiselect-all" ) ; $checkbox . parent ( ) . parent ( ) . addClass ( 'multiselect-all' ) ; $ ( 'label' , $li ) . append ( " " + this . options . selectAllText ) ; this . $ul . prepend ( $li ) ; $checkbox . prop ( 'checked' , false ) ; } }
Build the selct all.
Checks if a select all has already been created.
Build the selct all . Checks if a select all has already been created .