docs/vendor/mixitup/mixitup.js
function(cleanUp) {
            var self    = this,
                control = null,
                target  = null,
                i       = 0;

            self.callActions('beforeDestroy', arguments);

            for (i = 0; control = self.controls[i]; i++) {
                control.removeBinding(self);
            }

            for (i = 0; target = self.targets[i]; i++) {
                if (cleanUp) {
                    target.show();
                }

                target.unbindEvents();
            }

            if (self.dom.container.id.match(/^MixItUp/)) {
                self.dom.container.removeAttribute('id');
            }

            delete mixitup.instances[self.id];

            self.callActions('afterDestroy', arguments);
        }
function(cleanUp) {
            var self    = this,
                control = null,
                target  = null,
                i       = 0;

            self.callActions('beforeDestroy', arguments);

            for (i = 0; control = self.controls[i]; i++) {
                control.removeBinding(self);
            }

            for (i = 0; target = self.targets[i]; i++) {
                if (cleanUp) {
                    target.show();
                }

                target.unbindEvents();
            }

            if (self.dom.container.id.match(/^MixItUp/)) {
                self.dom.container.removeAttribute('id');
            }

            delete mixitup.instances[self.id];

            self.callActions('afterDestroy', arguments);
        }
function ( cleanUp ) { var self = this , control = null , target = null , i = 0 ; self . callActions ( 'beforeDestroy' , arguments ) ; for ( i = 0 ; control = self . controls [ i ] ; i ++ ) { control . removeBinding ( self ) ; } for ( i = 0 ; target = self . targets [ i ] ; i ++ ) { if ( cleanUp ) { target . show ( ) ; } target . unbindEvents ( ) ; } if ( self . dom . container . id . match ( / ^MixItUp / ) ) { self . dom . container . removeAttribute ( 'id' ) ; } delete mixitup . instances [ self . id ] ; self . callActions ( 'afterDestroy' , arguments ) ; }
Removes mixitup functionality from the container, unbinds all control
event handlers, and deletes the mixer instance from MixItUp's internal
cache.

This should be performed whenever a mixer's container is removed from
the DOM, such as during a page change in a single page application,
or React's `componentWillUnmount()`.

@example

.destroy([cleanUp])

@example <caption>Example: Destroying the mixer before removing its container element</caption>

mixer.destroy();

containerEl.parentElement.removeChild(containerEl);

@public
@instance
@since   2.0.0
@param   {boolean}   [cleanUp=false]
An optional boolean dictating whether or not to clean up any inline `display: none;` styling applied to hidden targets.
@return  {void}
Removes mixitup functionality from the container unbinds all control event handlers and deletes the mixer instance from MixItUp s internal cache .