js: add faster scrolling of miniscreens

This commit is contained in:
Frédéric Péters 2018-01-09 12:00:58 +01:00
parent 324240e256
commit 9893f263dc
1 changed files with 2 additions and 2 deletions

View File

@ -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');
}