demo/load-event/js/libs/bootstrap-multiselect/bootstrap-multiselect.js
function() {
            if (this.hasSelectAll()) {
                var allBoxes = $("li:not(.multiselect-item):not(.filter-hidden) input:enabled", this.$ul);
                var allBoxesLength = allBoxes.length;
                var checkedBoxesLength = allBoxes.filter(":checked").length;
                var selectAllLi  = $("li.multiselect-all", this.$ul);
                var selectAllInput = selectAllLi.find("input");

                if (checkedBoxesLength > 0 && checkedBoxesLength === allBoxesLength) {
                    selectAllInput.prop("checked", true);
                    selectAllLi.addClass(this.options.selectedClass);
                    this.options.onSelectAll();
                }
                else {
                    selectAllInput.prop("checked", false);
                    selectAllLi.removeClass(this.options.selectedClass);
                }
            }
        }
function() {
            if (this.hasSelectAll()) {
                var allBoxes = $("li:not(.multiselect-item):not(.filter-hidden) input:enabled", this.$ul);
                var allBoxesLength = allBoxes.length;
                var checkedBoxesLength = allBoxes.filter(":checked").length;
                var selectAllLi  = $("li.multiselect-all", this.$ul);
                var selectAllInput = selectAllLi.find("input");

                if (checkedBoxesLength > 0 && checkedBoxesLength === allBoxesLength) {
                    selectAllInput.prop("checked", true);
                    selectAllLi.addClass(this.options.selectedClass);
                    this.options.onSelectAll();
                }
                else {
                    selectAllInput.prop("checked", false);
                    selectAllLi.removeClass(this.options.selectedClass);
                }
            }
        }
function ( ) { if ( this . hasSelectAll ( ) ) { var allBoxes = $ ( "li:not(.multiselect-item):not(.filter-hidden) input:enabled" , this . $ul ) ; var allBoxesLength = allBoxes . length ; var checkedBoxesLength = allBoxes . filter ( ":checked" ) . length ; var selectAllLi = $ ( "li.multiselect-all" , this . $ul ) ; var selectAllInput = selectAllLi . find ( "input" ) ; if ( checkedBoxesLength > 0 && checkedBoxesLength === allBoxesLength ) { selectAllInput . prop ( "checked" , true ) ; selectAllLi . addClass ( this . options . selectedClass ) ; this . options . onSelectAll ( ) ; } else { selectAllInput . prop ( "checked" , false ) ; selectAllLi . removeClass ( this . options . selectedClass ) ; } } }
Updates the select all checkbox based on the currently displayed and selected checkboxes.
Updates the select all checkbox based on the currently displayed and selected checkboxes .