diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-09-24 11:58:36 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-09-24 11:58:36 -0400 |
| commit | f2215b36f3e1844ac058e7e7cfef6a53083efef9 (patch) | |
| tree | c8f8bfdcd7d4002b5dadfe3e28e18664e699a271 /public/assets/js/index.js | |
| parent | e273c92281e10c81f0605a0bf876d9a14bbe24d1 (diff) | |
nav view
Diffstat (limited to 'public/assets/js/index.js')
| -rw-r--r-- | public/assets/js/index.js | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/public/assets/js/index.js b/public/assets/js/index.js index 2e5ac92..fefb7fc 100644 --- a/public/assets/js/index.js +++ b/public/assets/js/index.js @@ -1,13 +1,13 @@ var app = (function(){ var app = {} + var id = -1 + app.init = function(){ - app.router = new SiteRouter () - app.view = null + app.view = new NavView () $(window).on("focus", app.focus) $(window).on("blur", app.blur) - $(window).on("keydown", app.keydown) } app.focused = true @@ -20,24 +20,7 @@ var app = (function(){ app.blur = function(){ app.focused = false } - - app.keydown = function(e){ - switch (e.keyCode) { - case 37: // left - // prev - break - case 39: // right - // next - break - case 38: // up - // home - break - case 40: // down - // random - break - } - } - + document.addEventListener('DOMContentLoaded', app.init) return app |
