Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@devdays
Created December 19, 2014 00:56
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 devdays/8b9c4cd182aedcaceae1 to your computer and use it in GitHub Desktop.
Save devdays/8b9c4cd182aedcaceae1 to your computer and use it in GitHub Desktop.
Single Page App - jQuery Require is optional with Sammy
require(['sammy'], function (sammy) {
var app = sammy('#content', function () {
this.get('#/', function (context) {
context.log('Yo yo yo');
});
this.get('#/:items', function (context) {
context.log('Ho ho ho');
});
});
$(function () {
app.run('#/');
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment