public/js/multiselect.min.js
function() {
            $('option', this.$select).each($.proxy(function(index, element) {
                var $input = $('li input', this.$ul).filter(function() {
                    return $(this).val() === $(element).val();
                });

                if ($(element).is(':selected')) {
                    $input.prop('checked', true);

                    if (this.options.selectedClass) {
                        $input.parents('li')
                            .addClass(this.options.selectedClass);
                    }
                }
                else {
                    $input.prop('checked', false);

                    if (this.options.selectedClass) {
                        $input.parents('li')
                            .removeClass(this.options.selectedClass);
                    }
                }

                if ($(element).is(":disabled")) {
                    $input.attr('disabled', 'disabled')
                        .prop('disabled', true)
                        .parents('li')
                        .addClass('disabled');
                }
                else {
                    $input.prop('disabled', false)
                        .parents('li')
                        .removeClass('disabled');
                }
            }, this));

            this.updateButtonText();
            this.updateSelectAll();
        }
function() {
            $('option', this.$select).each($.proxy(function(index, element) {
                var $input = $('li input', this.$ul).filter(function() {
                    return $(this).val() === $(element).val();
                });

                if ($(element).is(':selected')) {
                    $input.prop('checked', true);

                    if (this.options.selectedClass) {
                        $input.parents('li')
                            .addClass(this.options.selectedClass);
                    }
                }
                else {
                    $input.prop('checked', false);

                    if (this.options.selectedClass) {
                        $input.parents('li')
                            .removeClass(this.options.selectedClass);
                    }
                }

                if ($(element).is(":disabled")) {
                    $input.attr('disabled', 'disabled')
                        .prop('disabled', true)
                        .parents('li')
                        .addClass('disabled');
                }
                else {
                    $input.prop('disabled', false)
                        .parents('li')
                        .removeClass('disabled');
                }
            }, this));

            this.updateButtonText();
            this.updateSelectAll();
        }
function ( ) { $ ( 'option' , this . $select ) . each ( $ . proxy ( function ( index , element ) { var $input = $ ( 'li input' , this . $ul ) . filter ( function ( ) { return $ ( this ) . val ( ) === $ ( element ) . val ( ) ; } ) ; if ( $ ( element ) . is ( ':selected' ) ) { $input . prop ( 'checked' , true ) ; if ( this . options . selectedClass ) { $input . parents ( 'li' ) . addClass ( this . options . selectedClass ) ; } } else { $input . prop ( 'checked' , false ) ; if ( this . options . selectedClass ) { $input . parents ( 'li' ) . removeClass ( this . options . selectedClass ) ; } } if ( $ ( element ) . is ( ":disabled" ) ) { $input . attr ( 'disabled' , 'disabled' ) . prop ( 'disabled' , true ) . parents ( 'li' ) . addClass ( 'disabled' ) ; } else { $input . prop ( 'disabled' , false ) . parents ( 'li' ) . removeClass ( 'disabled' ) ; } } , this ) ) ; this . updateButtonText ( ) ; this . updateSelectAll ( ) ; }
Refreshs the multiselect based on the selected options of the select.
Refreshs the multiselect based on the selected options of the select .