hakimel / stroll.js

CSS3 list scroll effects

Home Page:http://lab.hakim.se/scroll-effects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding a Custom Scrollbar

raelcorrales opened this issue · comments

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.

  1. 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;
        };
  1. Change your
      CSS to:
overflow: hidden;

You can always use iScroll guys.