Skip to content

Instantly share code, notes, and snippets.

@grancalavera
Created May 21, 2012 14:01
Show Gist options
  • Save grancalavera/2762473 to your computer and use it in GitHub Desktop.
Save grancalavera/2762473 to your computer and use it in GitHub Desktop.
Backbone: override fetch to use JSONP
fetch: function (options) {
options = options ? _.clone(options) : {};
options.dataType = 'jsonp';
Backbone.Collection.prototype.fetch.call(this, options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment