Question

http://codepen.io/theandrewwest/pen/pDEIo

I'm using fullpage.js and have a section with a submenu that navigates through horizontal slides. I want to add an "active" class to the anchor corresponding to the active slide. I know the functionality is built in for navigating vertical sections using the "menu" option, and I have that working for the main nav, but it looks like I'll need to use a callback to add the class to anchors linked to horizontal slides.

I know just enough JS to get plugins working the way I want, but I'm not sure of the best way to set this up. I'm linking to the slides using "data-index" in the pen, but I plan on using custom anchors once I can get them working (no problem with sections, I just can't get them working for slides). I'm not sure if that makes any difference.

Was it helpful?

Solution

Solved. I added a working example at http://codepen.io/theandrewwest/pen/fltAE.

OTHER TIPS

You are using an old version of the plugin. If you take a look at the living demo page you will realize how it adds the active class by default to the active slide. Just check it with firebug or Chrome inspector.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top