Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.27 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. backbone.js collections - How to define a success callback for fetch (recursive though)
  2. var collection = new Backbone.Collection();
  3. var success = function(){
  4.     if(condition){
  5.         collection.fetch({success : success});
  6.     }
  7.  };
  8.  collection.fetch({success : success});