Tripod.js

Two-way data-binding is sooo 2009.

More Examples

When Data is Loaded into the Page on the Server Side

<p>
	City:<br>
	<input data-bound-to="address.city" value="Anchorage">
</p>
<p>
	State:<br>
	<select data-bound-to="address.state">
		<option value="AL">Alabama</option>
		<option value="AK" selected>Alaska</option>
		<option value="AR">Arkansas</option>
		...
	</select>
</p>
var address = new Tripod({}, 'address');
address.load(['city', 'state']);
console.log(address.get('city')); // "Anchorage"
console.log(address.get('state')); // "AK"

When Data is Loaded into the Page on the Client Side (via AJAX)

<p>
	City:<br>
	<input data-bound-to="address.city">
</p>
<p>
	State:<br>
	<select data-bound-to="address.state">
	...
</select>
</p>
// example AJAX call. Returns {city: 'Anchorage', state: 'AK'}
var addressData = someAjaxCallToGetData();
var address = new Tripod(addressData, 'address');
address.pushAll(); // now the DOM reflects the loaded AJAX data