src/console/simpleyui.js
function(node, className, force) {
        var add = (force !== undefined) ? force :
                !(hasClass(node, className));

        if (add) {
            addClass(node, className);
        } else {
            removeClass(node, className);
        }
    }
function(node, className, force) {
        var add = (force !== undefined) ? force :
                !(hasClass(node, className));

        if (add) {
            addClass(node, className);
        } else {
            removeClass(node, className);
        }
    }
function ( node , className , force ) { var add = ( force !== undefined ) ? force : ! ( hasClass ( node , className ) ) ; if ( add ) { addClass ( node , className ) ; } else { removeClass ( node , className ) ; } }
If the className exists on the node it is removed, if it doesn't exist it is added.
@method toggleClass
@for DOM
@param {HTMLElement} element The DOM element
@param {String} className the class name to be toggled
@param {Boolean} addClass optional boolean to indicate whether class
should be added or removed regardless of current state
If the className exists on the node it is removed if it doesn t exist it is added .