jQuery.Model.prototype.isNew  function     

Returns if the instance is a new object. This is essentially if the id is null or undefined.

new Recipe({id: 1}).isNew() //-> false
model.isNew() -> Boolean
{Boolean}

false if an id is set, true if otherwise.

© Jupiter IT - JavaScriptMVC Training and Support