jQuery.Model.prototype.update  function     

Sets the attributes on this instance and calls save. The instance needs to have an id. It will use the instance class's update method.

recipe.update({name: "chicken"}, success, error);

If OpenAjax.hub is available, the model will also publish a "modelName.updated" message with the updated instance.

model.update(attrs, success, error) -> undefined
{Object}

the model's attributes

{Function}

called if a successful update

{Function}

called if there's an error

{undefined}
© Jupiter IT - JavaScriptMVC Training and Support