Skip to content

Instantly share code, notes, and snippets.

@Darep
Created August 25, 2012 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Darep/3463637 to your computer and use it in GitHub Desktop.
Save Darep/3463637 to your computer and use it in GitHub Desktop.
// fetch the menus, show the menus and init the touch UI
var menuRequest = Application.Api.fetchMenus();
menuRequest.success(function (data) {
this.addMenus(data);
}.bind(this));
...
Application.Api.fetchMenus = function () {
return $.ajax({
type: 'GET',
url: '/api/menus'
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment