开发者

When item of collection is changed

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜