Basic Example

Bind a variable to a dom element

<h3 data-bind="counter"></h3>

Create an tinybind object

var tb = new TinyBind({ name:'counter', default:0, add:function(change) { console.log('add!'); }, update:function(change) { console.log('update!'); }, delete:function(change) { console.log('delete!'); } });

Do something with it:

setInterval(function() { var v = tb.get(); tb.set(++v); },1000);

Then watch the magic happen: