0.2.2 • Published 9 years ago

jsbond v0.2.2

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

JS Bond

Simple two-way data binding library for the browser.

Install

  • With npm: npm install jsbond
  • With bower: bower install jsbond
  • Or just download the bond.js file to your project.

Usage

Include bond.js:

<script src="bond.js"></script>

JavaScript:

var city = Bond('city');
city.set('Colombo');

console.log( city.get() );

// Optional initial value
var gender = Bond('gender', 'Male');
console.log( gender.get() );

HTML:

<input type="text" data-bond="city">
<div>City is <span data-bond="city"></span></div>

<select data-bond="gender">
  <option>Male</option>
  <option>Female</option>
  <option>Other</option>
</select>
0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago