lib/air/class.js
function removeClass(className) {
  if(!className) {
    // remove all classes from all matched elements
    this.each(function(el) {
      el.removeAttribute(attr);
    });
    return this;
  }
  var classes = className.split(/\s+/);
  this.each(function(el) {
    var val = el.getAttribute(attr);
    // no class attribute - nothing to remove
    if(!val) {
      return;
    }
    var names = val.split(/\s+/);
    names = names.filter(function(nm) {
      return ~classes.indexOf(nm) ? false : nm;
    });
    el.setAttribute(attr, names.join(' '));
  });
  return this;
}
function removeClass(className) {
  if(!className) {
    // remove all classes from all matched elements
    this.each(function(el) {
      el.removeAttribute(attr);
    });
    return this;
  }
  var classes = className.split(/\s+/);
  this.each(function(el) {
    var val = el.getAttribute(attr);
    // no class attribute - nothing to remove
    if(!val) {
      return;
    }
    var names = val.split(/\s+/);
    names = names.filter(function(nm) {
      return ~classes.indexOf(nm) ? false : nm;
    });
    el.setAttribute(attr, names.join(' '));
  });
  return this;
}
function removeClass ( className ) { if ( ! className ) { // remove all classes from all matched elements this . each ( function ( el ) { el . removeAttribute ( attr ) ; } ) ; return this ; } var classes = className . split ( / \s+ / ) ; this . each ( function ( el ) { var val = el . getAttribute ( attr ) ; // no class attribute - nothing to remove if ( ! val ) { return ; } var names = val . split ( / \s+ / ) ; names = names . filter ( function ( nm ) { return ~ classes . indexOf ( nm ) ? false : nm ; } ) ; el . setAttribute ( attr , names . join ( ' ' ) ) ; } ) ; return this ; }
Remove a single class, multiple classes, or all classes from
each element in the set of matched elements.
Remove a single class multiple classes or all classes from each element in the set of matched elements .