stroll.js
stroll.js copied to clipboard
Adding a Custom Scrollbar
Theres a way to change the custom scrollbar and use the this effects.
I used some plugins to change the scrollbar but the effects crush.
I'm trying the same thing for the reason that most of the plugins uses some div and a container to do the custom scrollbar it is not compatible with them
Hi guys, did you finally manage to do that ? I tried to set up the same with mCustomScrollbar but it's not working... Thanks
mCustomScrollbar is a piece of crap. Use this, I tested every effect and it worked perfectly: https://github.com/noraesae/perfect-scrollbar
mCustomScrollbar is fine. Took me a while to figure out how to get it to work.
-
Make sure stroll.js is initialized on the
- element BEFORE you call the mCustomScrollbar script.
-
Add this very haxy code before:
// Quit if nothing changed
if(this.element.children[0].tagName == "DIV") {
var mCSB = this.element.children[0].children[0];
var scrollTop = mCSB.pageYOffset || Math.abs(mCSB.offsetTop),
scrollBottom = scrollTop + this.listHeight;
};
- Change your
- CSS to:
overflow: hidden;
You can always use iScroll guys.