Skip to content

Instantly share code, notes, and snippets.

@jashkenas
Forked from texel/setStatus.js
Created December 2, 2010 21:58
Show Gist options
  • Save jashkenas/726150 to your computer and use it in GitHub Desktop.
Save jashkenas/726150 to your computer and use it in GitHub Desktop.
this.set({status: status});
this.trigger("change:status", this, status);
setStatus : function ( status ) {
var triggerChange = this.get("status") == status;
this.set({status: status});
if (triggerChange)
this.trigger("change:status", this, status);
}
this.set({status: status, forceChange: true});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment