0

I am looking to try and prevent downward scroll whilst allowing upward scroll is this possible using either css or javascript/jQuery?

isherwood
  • 58,414
  • 16
  • 114
  • 157
dwinnbrown
  • 3,789
  • 9
  • 35
  • 60
  • How will you go up without going down? I can't understand the question. Can you show an example? – m4n0 Jul 05 '15 at 18:14
  • basically I am using css transitions and going between pages. I am going for something similar to parallax and when the user is on the page at the bottom they obviously can't go down. Each 'page' is a scene in the software I am using see this link for more info: http://1drv.ms/1M4vlIj – dwinnbrown Jul 05 '15 at 18:31
  • Tried using this? http://alvarotrigo.com/fullPage/ – m4n0 Jul 05 '15 at 18:35
  • 1
    Don't break expected behaviors. Your users will think your page/site is broken. – Jon P Jul 06 '15 at 01:08

1 Answers1

0

You can use stopPropogation and preventDefault, as seen here > jQuery or Javascript - how to disable window scroll without overflow:hidden;

stopPropogation stops the event from bubbling to parents and preventDefault attempts to cancel the event if possible.

So I would bind these to a scroll handler.

$(window).scroll(function(e){
    e.preventDefault();
    e.stopPropogation();
});
Community
  • 1
  • 1
Zze
  • 18,229
  • 13
  • 85
  • 118