function addClass(element, className) {
    if (element instanceof Element) {
        if (element.classList) {
            element.classList.add(className);
        } else {
            removeClass(element, className);
            element.className += (element.className.length ? " " : "") + className;
        }
    }
}
Add a single className to an Element.