function removeClass(element, className) {
    if (!className) return;

    if (element.classList) {
      element.classList.remove(className);
    } else {
      if (elementMatches(element, '.' + className)) {
        element.className = (' ' + element.className + ' ')
          .replace(' ' + className + ' ', ' ')
          .trim();
      }
    }
  }
Remove class from an element.

@param {HTMLElement} element
@param {String} className