code: function hasClass(className) {
    var i, val;
    for(i = 0;i < this.length;i++) {
      val = this.get(i).getAttribute(attr);
      val = val ? val.split(/\s+/) : [];
      if(~val.indexOf(className)) {
        return true;
      }
    }
    return false;
  }
docs: Determine whether any of the matched elements are assigned the
  given class.