js: add faster scrolling of miniscreens
This commit is contained in:
parent
324240e256
commit
9893f263dc
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue