20
I want to work with backbone.js and jquery. The app is supposed to run offline on mobile phones (i.e. "localhost"), there are few calls on a server side backend somewhere in the internet.
What is the best way to realize cross domain requests with backbone.js?
I would like to use JSON, but I could eventually switch back to REST if necessary.
Here's my not very impressive code so far:
App.Collections.Events = Backbone.Collection.extend({
model: Event,
url: 'http://mydomain.com/api/getevents/user_id/1/'
});