summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--static/js/combo.public.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/static/js/combo.public.js b/static/js/combo.public.js
index b46a351..0c115e4 100644
--- a/static/js/combo.public.js
+++ b/static/js/combo.public.js
@@ -9,12 +9,11 @@ $(function() {
var $window = $(window);
var offset = parseInt(Math.random()*2000);
var $ecrans = $('.ecrans');
- var pos = $window.scrollTop();
- $ecrans.css('background-position', (offset + pos/2) + 'px 0px');
$window.bind('scroll', function() {
var pos = $window.scrollTop();
$ecrans.css('background-position', (offset + pos/2) + 'px 0px');
});
+ $window.trigger('scroll');
}
if ($('div[id|=chiffres]').length) {
var $chiffres_section = $('div[id|=chiffres]');