function removeElClass(element, classToRemove) {
  if (!hasElClass(element, classToRemove)) {return;}

  let classNames = element.className.split(' ');

  // no arr.indexOf in ie8, and we don't want to add a big shim
  for (let i = classNames.length - 1; i >= 0; i--) {
    if (classNames[i] === classToRemove) {
      classNames.splice(i,1);
    }
  }

  element.className = classNames.join(' ');
}
/**
 * Remove a CSS class name from an element
 *
 * @param {Element} element    Element to remove from class name
 * @param {String} classToRemove Classname to remove
 * @function removeElClass
 */
Remove a CSS class name from an element
@param {Element} element    Element to remove from class name
@param {String} classToRemove Classname to remove
@function removeElClass
Remove a CSS class name from an element @param { Element } element Element to remove from class name @param { String } classToRemove Classname to remove @function removeElClass
function removeElClass(element, classToRemove) {
  if (!hasElClass(element, classToRemove)) {return;}
  let classNames = element.className.split(' ');
  for (let i = classNames.length - 1; i >= 0; i--) {
    if (classNames[i] === classToRemove) {
      classNames.splice(i,1);
    }
  }
  element.className = classNames.join(' ');
}
function removeElClass ( element , classToRemove ) { if ( ! hasElClass ( element , classToRemove ) ) { return ; } let classNames = element . className . split ( ' ' ) ; for ( let i = classNames . length - 1 ; i >= 0 ; i -- ) { if ( classNames [ i ] === classToRemove ) { classNames . splice ( i , 1 ) ; } } element . className = classNames . join ( ' ' ) ; }
Remove a CSS class name from an element
 @param {Element} element    Element to remove from class name
 @param {String} classToRemove Classname to remove
 @function removeElClass
Remove a CSS class name from an element @param { Element } element Element to remove from class name @param { String } classToRemove Classname to remove @function removeElClass
// no arr.indexOf in ie8, and we don't want to add a big shim