user3799112
user3799112

Reputation: 71

Navigation Issue with Fullpage.js, active state not showing

I'am working on a website using fullpage.js. Using a custom menu. All navigation is working fine, but the active state is not showing up. I've been looking up solutions, but all I could find was how to use a custom menu with the menu option of fullpage.js

I' m not great at query and js, some help would be great.

This is the link to the site.http://development.darktown.ch

Upvotes: 1

Views: 539

Answers (1)

Alvaro
Alvaro

Reputation: 41605

Your data-menuanchor attributes' value should match the anchors value in the fullpage.js initialization:

anchors: ['home', 'about', 'locations', 'contact'],

Right now yours doesn't:

<ul id="menu" class="menu">
    <li data-menuanchor="section0"><a href="#home">home</a></li>
    <li data-menuanchor="section1"><a href="#about">uber Dark Town</a></li>
    <li data-menuanchor="section2"><a href="#locations">standorte</a></li>
    <li data-menuanchor="section3"><a href="#contact">contact</a></li>
</ul>

As detailed in the docs:

In order to link the elements of the menu with the sections, an HTML 5 data-tag (data-menuanchor) will be needed to use with the same anchor links as used within the sections. Example:

Upvotes: 1

Related Questions