obj={name:'value'};
How to call a function every time when I change an object (adding a new property, removing properties), and when I read the properties (simmered another function)?
obj={name:'value'};
How to call a function every time when I change an object (adding a new property, removing properties), and when I read the properties (simmered another function)?
Have a look at KnockoutJS. This is a very powerful MVVM framework and you would benefit from using it fully to separate model from view logic. But you could also use it just for this specific need (if 40kb if bareable for your needs)... if you look into observables they do what you want: http://knockoutjs.com/documentation/observables.html