gemini-scrollbar
gemini-scrollbar copied to clipboard
[Question] Smooth scrolling, when clicking an anchor link
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:
3. Actual behavior
Source — https://github.com/KristinitaTest/KristinitaTest.github.io/blob/master/Scrollbar/Gemini-smooth.html.
Demonstration:
I get an error in Firefox native console:
TypeError: el is null
4. Did not help
- I read the documentation of Gemini-Scrollbar,
- I use search in Google and issues of this repository.
Thanks.
Hi @Kristinita, does this work for you https://jsfiddle.net/05efmw1f/?
BTW, there is a similar issues regarding mixing gemini + jquery + smooth-scrolling (https://github.com/noeldelgado/gemini-scrollbar/issues/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?
@Kristinita, can this be closed?