Take the 2-minute tour ×

I adapted this plugin for jQuery that uses the parallax effect for my website. Problem is (even in the demo in the link above) that Chrome and IE have a really NOT smooth scroll.. it only works well when you press the middle button on the mouse and the scroll is continuous (not "step-by-step" when you scroll the mouse wheel). So when you use the mouse wheel to scroll, the parallax effect is completely ruined. In Firefox instead the scroll is continous even when scrolling with the mouse wheel. Is there a way to have continous scrolling in IE and Chrome too (javascript?).

Here's my website (as you can see, if you visit it whit Firefox the effect is completely different).

share|improve this question
check stackoverflow.com/a/14905953/1055987 if that helps –  JFK Sep 1 '13 at 23:26
This helped me stackoverflow.com/q/14905779. The fiddle in the "EDIT" field works perfectly. :) –  MultiformeIngegno Sep 2 '13 at 9:14
@MultiformeIngegno I'm having the exact same issue. Can you please post your correct solution as an answer? Your website now works perfectly on Chrome and IE, I wish to accomplish the same. Thanks. –  Cthulhu Oct 4 '13 at 10:40
Yep, done. It's a shame on Chrome to behave like that BTW.. :( –  MultiformeIngegno Oct 4 '13 at 12:34
add comment

1 Answer

up vote 6 down vote accepted

I solved the problem with this jQuery script (which adds EventListener for both keyboard and mouse scroll), hope it helps. :)

window.onmousewheel = document.onmousewheel = wheel;

var time = 1300;
var distance = 270;

function wheel(event) {
    if (event.wheelDelta) delta = event.wheelDelta / 120;
    else if (event.detail) delta = -event.detail / 3;

    if (event.preventDefault) event.preventDefault();
    event.returnValue = false;

function handle() {

        scrollTop: $(window).scrollTop() - (distance * delta)
    }, time);

$(document).keydown(function (e) {

    switch (e.which) {
        case 38:
                scrollTop: $(window).scrollTop() - distance
            }, time);

        case 40:
                scrollTop: $(window).scrollTop() + distance
            }, time);
share|improve this answer
add comment

Your Answer


