2

I've made a simple parallax page using skrollr.js, but after showing one to the client he decided that scrolling up instead of down would be better, is there a way to "rebind" mouse wheel behavior to avoid remaking all the animations? Here's a piece of a code I've tried to use:

$("html, body").animate({ // executed on scroll
    scrollTop: st+2500,
}, 1500, 'easeOutQuad');
    timeouts.push(setTimeout(function(){
    active = true;
    enable_scroll();
}, 2000) );
disable_scroll(); //disabling scroll

It could work, but I couldn't scroll up from the top of a page. I've started "spaghettieing" code even more and kinda lost myself there. Maybe there's a better way of solving this problem? Cheers!

Gryphz
  • 33
  • 3
  • possible duplicate of [Reverse Scrolling](http://stackoverflow.com/questions/20776045/reverse-scrolling) – Jeremy W Jan 13 '15 at 20:30
  • 1
    Don't do that, it goes against lots of UX guidelines. If the page is to be scrolled "up" to see more data, you need to indicate that visually, so the user goes the "right" direction without you needing to make a completely non-standard action for the wheel. – Jasmine Jan 13 '15 at 20:30
  • @Jasmine clients are the best UI designers you'll ever get to know ;) If one says *make it rain*... rain should be. – Roko C. Buljan Jan 13 '15 at 20:31
  • Yeah, the reason there was that if I'm using an opening door animation (2 divs sliding left and right), than i should _enter_ the place by scrolling up. – Gryphz Jan 13 '15 at 20:33
  • @Gryphz that's a good reason indeed. – Roko C. Buljan Jan 13 '15 at 20:34
  • Yes, and scrolling UP should always involve pushing the wheel, never pulling it. I understand the stakeholders rule, but I would fight them on this, big time. – Jasmine Jan 13 '15 at 20:39
  • Unless "figuring out weird and unusual ways to use the mouse" is part of the game play. Then yeah, play tricks with them all you want. – Jasmine Jan 13 '15 at 20:40

0 Answers0