HotDrink / hotdrink

JavaScript MVVM library with support for multi-way dependencies and generic, rich UI behaviors.
http://hotdrink.github.io/hotdrink/
58 stars 9 forks source link

Group binders using event delegation #40

Open philipvr opened 12 years ago

philipvr commented 12 years ago

Fixes issue #25, bind the radioGroup or checkboxGroup to the outer <span> or <div>

Text color:
<span data-bind="foreach: fontColors, radioGroup: curFontColor">
  <input type="radio" name="color" data-bind="attr: {value: $this, id: $this}" />
  <label data-bind="attr: {for: $this}, text: $this"></label>
</span>