Skip to content

Instantly share code, notes, and snippets.

@trunalb
trunalb / router.js
Created July 14, 2012 16:55
Backbone Router
App.BaseRouter = Backbone.Router.extend({
showPage : function(pageId, callback){
//perform basic pre-show checks
//implement transitions (and turn them off if required)
}
});
App.Router = App.BaseRouter.extend({
@trunalb
trunalb / Config.js
Created May 3, 2012 19:57
Config code
getConfig : function() {
//Default config
var config = {
size : 3,
maxVisibleOnOneSide : 1,
};
//Update the config based on device
if($isDesktop || $native.isNative() && $os.ipad) {