Using Sammy.js 

var app = Sammy(...);

jQuery(function() {
  app.run();
});