bruth / synapse

Hooks to support data binding between virtually any object.
http://bruth.github.com/synapse/docs/
BSD 2-Clause "Simplified" License
150 stars 6 forks source link

compound interface for class #19

Closed dbushong closed 12 years ago

dbushong commented 12 years ago

It would be very useful for the jQuery hook to have a compound interface: "class." (that just treated its argument as truthy)

e.g.:

<style>.red { background-color: red; }</style>
<input id="redden" type="checkbox">
<div class="rounded shadowy" id="box"></div>

<script>
Synapse('#redden').notify(Synapse('#box'), { observerInterface: 'class:red' });
</script>