dist/ZeroClipboard.js
function(element, value) {
    var c, cl, className, classNames = [];
    if (typeof value === "string" && value) {
      classNames = value.split(/\s+/);
    }
    if (element && element.nodeType === 1 && classNames.length > 0) {
      className = (" " + (element.className || "") + " ").replace(/[\t\r\n\f]/g, " ");
      for (c = 0, cl = classNames.length; c < cl; c++) {
        if (className.indexOf(" " + classNames[c] + " ") === -1) {
          className += classNames[c] + " ";
        }
      }
      className = className.replace(/^\s+|\s+$/g, "");
      if (className !== element.className) {
        element.className = className;
      }
    }
    return element;
  }
function(element, value) {
    var c, cl, className, classNames = [];
    if (typeof value === "string" && value) {
      classNames = value.split(/\s+/);
    }
    if (element && element.nodeType === 1 && classNames.length > 0) {
      className = (" " + (element.className || "") + " ").replace(/[\t\r\n\f]/g, " ");
      for (c = 0, cl = classNames.length; c < cl; c++) {
        if (className.indexOf(" " + classNames[c] + " ") === -1) {
          className += classNames[c] + " ";
        }
      }
      className = className.replace(/^\s+|\s+$/g, "");
      if (className !== element.className) {
        element.className = className;
      }
    }
    return element;
  }
function ( element , value ) { var c , cl , className , classNames = [ ] ; if ( typeof value === "string" && value ) { classNames = value . split ( / \s+ / ) ; } if ( element && element . nodeType === 1 && classNames . length > 0 ) { className = ( " " + ( element . className || "" ) + " " ) . replace ( / [\t\r\n\f] / g , " " ) ; for ( c = 0 , cl = classNames . length ; c < cl ; c ++ ) { if ( className . indexOf ( " " + classNames [ c ] + " " ) === - 1 ) { className += classNames [ c ] + " " ; } } className = className . replace ( / ^\s+|\s+$ / g , "" ) ; if ( className !== element . className ) { element . className = className ; } } return element ; }
Add a class to an element, if it doesn't already have it.

@returns The element, with its new class added.
@private
Add a class to an element if it doesn t already have it .