Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moveTo is not working #14

Open
vem opened this issue Apr 30, 2015 · 1 comment
Open

moveTo is not working #14

vem opened this issue Apr 30, 2015 · 1 comment

Comments

@vem
Copy link

vem commented Apr 30, 2015

tips: Cannot read property 'className' of null

@yeahdino
Copy link

Solution provided by Reddit user IAMAnuttysquirrel:

Bad luck, the vanilla JS version of the library has a bug too. But we can work around it.
moveTo() tries to remove .active from the .onepage-pagination li a jquery.onepage-scroll.js:473 But since you initialised onePageScroll({pagination: false}) it actually hasn't created the pagination dom elements. Thus, trying to change the className of a non-existing element... Uncaught TypeError.
The onePageScroll developer has forgotten to surround this piece of code with:

if(settings.pagination == true) {
_removeClass(.....);
_addClass(.....);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants