0

I am making this site on which I don't want people to be able to scroll with the mouse or the arrow buttons but I want it to be possible to scroll with the anchor links.

  • 1
    Probably duplicate of http://stackoverflow.com/questions/4770025/how-to-disable-scrolling-temporarily – Hugo Sousa Feb 02 '15 at 23:28
  • Why do you want to do that to your users? Are you trying to 'hide' the content from them? If so you would be better of with DIV elements that you show and hide instead. – greg_diesel Feb 02 '15 at 23:29
  • @HugoSousa I will check it out better as it didn't work for be when I checked it before. – Richard Lund Winther Feb 02 '15 at 23:33
  • @greg_diesel I'm just making a personal site that will have a page for each category like CV, Books, Music etc. And I would prefer to have it to feel like they are separate pages but with a scroll-like transition between the pages. That's the idea, if it turns out crap I will just leave it normal lol – Richard Lund Winther Feb 02 '15 at 23:35
  • 1
    @RichardLundWinther Here is a jquery plugin that does what you describe. http://alvarotrigo.com/fullPage/ – greg_diesel Feb 02 '15 at 23:39
  • 1
    @HugoSousa I got it to work. The difference was that he used a button to disable and enable it so I had to fix the trigger of the function to $(document).ready and not button onclick. thanks. – Richard Lund Winther Feb 02 '15 at 23:44

1 Answers1

0

On the link provided by @Hugo Sousa you can still scrolling dragging the scroll bar.

You can try using fullPage.js for it using the method $.fn.fullpage.setAllowScrolling(false).

Basically, users won't be able to scroll in the normal way if there's no scroll bar. So this sounds like a good solution for your problem.

Alvaro
  • 40,778
  • 30
  • 164
  • 336
  • Thanks for the solution, I will look further into it! I basically just added overflow:hidden; on the body so it wouldn't show the scrolbar at all to fix that problem. But that effect that makes it scroll a full page with just one scroll is kinda cool. I guess I have research to do! – Richard Lund Winther Feb 03 '15 at 14:43