18 September 2013

Demo of Two way binding in Javascript using watchjs and Rivets.js !

I have updated my demos and it really looks cool. Want to share !!

So, I finally have very beautiful method of Two way binding between "DOM" and "Object Oriented JavaScript"

Example --

You can have perfect Sync between

THIS Model data
var PersonClass = function (name) { = name;
PersonClass.prototype = {
change : function (Event, TargetEle) { = "Chetan";


THIS DOM section !
<button data-on-click="scope:change">Change Model Data(1)</button>
<h3>Hello <span data-text=""></span></h3>
<input data-input="">

Full demo is available at

I guess, this will make life easy for many JS developers who want to decouple & sync DOM-UI and Model data

│  नरेन्द्र सिसोदिया
│  स्वदेशी प्रचारक, नई दिल्ली

No comments: