previousmodel.previous(attribute)
During a "change"
event, this method can be used to get the previous value of a changed attribute.
var bill = new Backbone.Model({ name: "Bill Smith" }); bill.on("change:name", function(model, name) { alert("Changed name from " + bill.previous("name") + " to " + name); }); bill.set({name : "Bill Jones"});
Please login to continue.