From 9893f263dccd3e9ab419e08ef3d7a7b0e55f8a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 9 Jan 2018 12:00:58 +0100 Subject: [PATCH] js: add faster scrolling of miniscreens --- static/js/combo.public.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/combo.public.js b/static/js/combo.public.js index 0c115e4..b6fa61a 100644 --- a/static/js/combo.public.js +++ b/static/js/combo.public.js @@ -10,8 +10,8 @@ $(function() { var offset = parseInt(Math.random()*2000); var $ecrans = $('.ecrans'); $window.bind('scroll', function() { - var pos = $window.scrollTop(); - $ecrans.css('background-position', (offset + pos/2) + 'px 0px'); + var pos = Math.pow($window.scrollTop(), 1.1); + $ecrans.css('background-position', (offset + pos) + 'px 0px'); }); $window.trigger('scroll'); }