code: function hasClass(el, className) {
      var test;
  
      if (el.classList) {
        test = el.classList.contains(className);
      } else {
        var className = new RegExp('(^| )' + className + '( |$)', 'gi');
        test = new RegExp(className).test(el.className);
      }
  
      return test;
    }
docs: Checks if an element has a given class
  @private
  @param {Element} el - element to search for the class
  @param {String} className - class name to search for