I’m using the scrollTo plugin for a horizontal website and it works fine. I have a list of links on the main section and I can also easily move among them one at a time, back and forth. For the plugin to work I have to use the overflow:hidden property, however I want to give users the choice to slide the scrollbar if they prefer it. So I found the LocalScroll plugin and with a bit of code (written by someone else, I just copied it as is) I now have the scrollbar sliding along each section of the site.
The problem is that the anchors I use to move one section back and forward stopped working, so I have to keep going back to the front page to click on whatever section I want to see. It might be better explained with this example. Click on any link to go to a specific section, and within that section the ‘back’ and ‘forth’ links don’t work. You have to click the logo (well, the space where it should be) to the left to go back to the main section.
I’ve seen other examples of horizontal websites and I noticed that the ones with the sliding scrollbar as I need it only have a couple of main links and they’re fixed-positioned, so I’m wondering if it’s possible to make it work the way I have it.
In the example, the custom.js file is the one that works with overflow:hidden, and the test.js file has the additional plugin/code I added.
As always I’d appreciate very much any help.
With scrollTo I was using jQuery classes to move from one section to another, so I just removed those clases and used the sections id’s in the anchor elements. It now works as I wanted 🙂