src/main/javascript/dom/floatz.dom.dom.js
/**
     * Replace class.
     *
     * @param className Class name to be replaced
     * @param otherClassName Class name to be set
     *
     * @returns {DOMElement} DOMElement for chaining
     */
Replace class.
@param className Class name to be replaced
@param otherClassName Class name to be set


Replace class . @param className Class name to be replaced @param otherClassName Class name to be set
replaceClass(className, otherClassName) {
        if (this._origNode.classList) {
            if (this._origNode.classList.replace) {
                if (this.hasClass(className)) {
                    this._origNode.classList.replace(className, otherClassName);
                } else {
                    this.addClass(otherClassName);
                }
            } else {
                this.removeClass(className).addClass(otherClassName);
            }
        } else {
            console.error("classList not available");
        }
        return this;
    }
replaceClass ( className , otherClassName ) { if ( this . _origNode . classList ) { if ( this . _origNode . classList . replace ) { if ( this . hasClass ( className ) ) { this . _origNode . classList . replace ( className , otherClassName ) ; } else { this . addClass ( otherClassName ) ; } } else { this . removeClass ( className ) . addClass ( otherClassName ) ; } } else { console . error ( "classList not available" ) ; } return this ; }
Replace class.
Replace class .