From 1803595fa22753e7f21fb4b1f4b8f0b848cf252b Mon Sep 17 00:00:00 2001 From: psychobunny Date: Wed, 5 Jun 2013 17:59:20 -0400 Subject: [PATCH] starting: mobile sidebar menu (intending to take the span3 hidden on mobile and turn it into a slidein sidebar) --- public/src/app.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/public/src/app.js b/public/src/app.js index 11095a8e1d..2a30f3c867 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -240,5 +240,23 @@ var socket, } } }, false); + + + addTouchEvents(); }); + + + + + function addTouchEvents() { + var el = jQuery("#content"), + width = el.width(); + + el.on('touchmove', function(e) { + //this.style.marginLeft = - parseInt(width - event.touches[0].pageX) + 'px'; + }); + el.on('touchend', function(e) { + this.style.marginLeft = 'auto'; + }) + } }());