Fullpage.js: data-anchor doesn't work

Created on 6 Jul 2018  路  2Comments  路  Source: alvarotrigo/fullPage.js

Description

Something changed between v 2.9.7 and v 3.0.1 such that a data-anchor attribute no longer works for a vertical nav menu (dots on left or right sides).

The instructions here are either out of date or something is broken in the updated library.

Link to isolated reproduction with no external CSS / JS

Issue: jsfiddle. I used the example "examples/navigation-vertical.html" to demonstrate the issue.

Steps to reproduce it

  1. Comment out anchor option in the js.
  2. Add a data-anchor attribute to each section in the html.
  3. Give each data-anchor a value matching what was in the anchors array.
  4. Try to click on the nav dots. They don't have anchors that match the data-anchor of each section. Upon inspection they are all set to '#'. Scrolling seems to work fine but the anchors are broken.

Versions

MacOS, Chrome,

bug fixed on dev

Most helpful comment

Thanks for reporting it!!
It seems I missed it on the unit tests!

I've fixed it now in the dev branch 3.0.2 which I'll merge soon, as it is a major bug.
Feel free to use the JS from that branch.

All 2 comments

Thanks for reporting it!!
It seems I missed it on the unit tests!

I've fixed it now in the dev branch 3.0.2 which I'll merge soon, as it is a major bug.
Feel free to use the JS from that branch.

Fixed now in fullpage.js 3.0.2

Was this page helpful?
0 / 5 - 0 ratings