AmpersandJS/ampersand-dom-bindings — pull request #28 by chesles (2014-10-31 02:55:53+00:00)
Title: implement switchAttribute binding

Implements `switchAttribute` binding as described in https://github.com/AmpersandJS/ampersand-dom-bindings/issues/25

- supports using either a `name: "attribute name"` option, or providing a key/value object as the case value, where the keys become the attribute names to set
- different values can set different attributes safely - attributes set by the previous value are cleared
- If the value is not handled in one of the cases, the previously-set attributes are cleared