function jqLiteHasClass(element, cls) {
  if (!cls || !element.getAttribute) return false;
  return (_getExistingClasses(element).indexOf(' ' + cls + ' ') > -1);
}
Check if element has class.
@param {Element} element - The DOM element.
@param {string} cls - The class name string.