I am looking to try and prevent downward scroll whilst allowing upward scroll is this possible using either css or javascript/jQuery?
Asked
Active
Viewed 62 times
0
-
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
-
1Don't break expected behaviors. Your users will think your page/site is broken. – Jon P Jul 06 '15 at 01:08
1 Answers
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();
});