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

[Question] Smooth scrolling, when clicking an anchor link #52

Open
Kristinita opened this issue Jul 27, 2017 · 3 comments
Open

[Question] Smooth scrolling, when clicking an anchor link #52

Kristinita opened this issue Jul 27, 2017 · 3 comments
Labels

Comments

@Kristinita
Copy link

Kristinita commented Jul 27, 2017

1. Briefly

I don't understand, how I can use smooth scrolling, when I click an anchor link, if I use Gemini scrollbar.

2. Expected behavior

If I use code from this answer:

Source on Codepen — https://codepen.io/Kristinita/pen/NvqBPV.

Demonstration:

Without Gemini

3. Actual behavior

Source — https://github.com/KristinitaTest/KristinitaTest.github.io/blob/master/Scrollbar/Gemini-smooth.html.

Demonstration:

With Gemini

I get an error in Firefox native console:

TypeError: el is null

TypeError

4. Did not help

  1. I read the documentation of Gemini-Scrollbar,
  2. I use search in Google and issues of this repository.

Thanks.

@noeldelgado
Copy link
Owner

Hi @Kristinita, does this work for you https://jsfiddle.net/05efmw1f/?

BTW, there is a similar issues regarding mixing gemini + jquery + smooth-scrolling (#28).

Important bits:

  • new GeminiScrollbar({ element: document.body ...
  • $( scrollbar.getViewElement() ).animate
  • html { height: 100vh }

If that works for you, how do you think the documentation can be improved?

@noeldelgado
Copy link
Owner

@Kristinita, can this be closed?

@Kristinita
Copy link
Author

@noeldelgado , see issue. I don't understand, how I can solve the problem.

Thanks.

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

No branches or pull requests

2 participants