开发者

When item of collection is changed

开发者 https://www.devze.com 2023-04-06 02:27 出处:网络
When a item of collection changed, collec开发者_运维知识库tions \"change\" trigger is fired or not? If not should i bind them myself? Do anybody give me an example about this?the change event is fired

When a item of collection changed, collec开发者_运维知识库tions "change" trigger is fired or not? If not should i bind them myself? Do anybody give me an example about this?


the change event is fired every time a model's attributes are changed. this event fires for the model itself and for any collection the model belongs to.

someCollection.bind("change", function(model, attributes){
  // do something with the model, here
});
0

精彩评论

暂无评论...
验证码 换一张
取 消