Ajax Blog


Chain.js: jQuery Data Binding Service

Posted in Ajax News by Dion Almaer on the August 21st, 2008

Rizqi Ahmad has created a data binding service for jQuery called Chain.js.

A simple example shows you where to start. When given HTML like:

HTML:
  1.  
  2. <div id="quickdemo">
  3.     <div class="item"><span class="library">Library Name</span></div>
  4. </div>
  5.  

The following JavaScript will add data as items to the list:

JAVASCRIPT:
  1.  
  2. $('#quickdemo')
  3.     .items([
  4.         {library:'Prototype'},
  5.         {library:'jQuery'},
  6.         {library:'Dojo'},
  7.         {library:'MooTools'}
  8.     ])
  9.     .chain();
  10.  

Check out the demos for more detailed examples.

Source: Ajaxian » Front Page
Original Article: http://feeds.feedburner.com/~r/ajaxian/~3/370608803/chainjs-jquery-data-binding-service

Comments are closed.