From 9d17f4ba7a238ca1286ac3021a2ee4f615adee5a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 12 Feb 2013 21:37:39 +0400 Subject: [PATCH] more work on scrolling... Signed-off-by: Alex A. Naanou --- layout.html | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/layout.html b/layout.html index 1233301..6e988e6 100755 --- a/layout.html +++ b/layout.html @@ -86,14 +86,26 @@ $(document).ready(function(){ }, function(k){console.log(k)})) + var t = null + var scrolling = false $('.viewer') + .on('scroll', function(evt){ + scrolling = true + clearTimeout(t) + t = setTimeout(function(){ + //setCurrentPage() + }, 200) + }) .on('mouseup touchend', function(evt){ - setCurrentPage() + //setCurrentPage() + scrolling = false }) + /* if(!NAVIGATE_RELATIVE_TO_VISIBLE){ $('.viewer').css({overflow: 'hidden'}) } + */ // expand the templates... runMagazineTemplates()