jquery/jquery — pull request #674 by keithamus (2012-02-08 20:05:52+00:00)
Title: addClass/removeClass can now be passed arrays, or N arguments

It can be difficult to try and add classes to an element where the class names are already defined in vars, typically this can be done by multiple calls, or Array.join:

```javascript
var activeClass = 'active', enabledClass = 'enabled';
$('div').addClass(activeClass).addClass(enabledClass);
$('input').addClass([activeClass, enabledClass].join(' '));
```

This commit allows you to pass arrays straight to addClass/removeClass, or pass _n_ arguments of class name strings/arrays and jQuery will work them out.

Examples:

```javascript
addClass(['foo', 'bar']);
addClass(['foo bar', 'baz']);
addClass(['foo', 'bar', 'baz']);
addClass('foo', 'bar', 'baz');
addClass('foo', ['bar', 'baz']);

removeClass(['foo', 'bar']);
removeClass(['foo bar', 'baz']);
removeClass(['foo', 'bar', 'baz']);
removeClass('foo', 'bar', 'baz');
removeClass('foo', ['bar', 'baz']);
```