jQuery.Model.prototype.save  function     

Saves the instance if there are no errors.
If the instance is new, jQuery.Model.create is called; otherwise, jQuery.Model.update is called.

recipe.save(success, error);

If OpenAjax.hub is available, after a successful create or update, "modelName.created" or "modelName.updated" is published.

model.save(success, error) -> undefined
{optional:Function}

called if a successful save.

{optional:Function}

called if the save was not successful.

{undefined}
© Jupiter IT - JavaScriptMVC Training and Support