code: function addClass(elem, value) {
          if (value && typeof value === "string") {
              var classNames = (elem.className + ' ' + value).split(/\s+/);
              var setClass = ' ';
  
              each(classNames, function (className) {
                  if (setClass.indexOf(' ' + className + ' ') < 0) {
                      setClass += className + ' ';
                  }
              });
  
              elem.className = setClass.slice(1, -1);
          }
      }
docs: Add the classNames for element.
  
  @param {Element} elem
  @param {String} value