stroll.js icon indicating copy to clipboard operation
stroll.js copied to clipboard

Adding a Custom Scrollbar

Open raelcorrales opened this issue 11 years ago • 5 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.

raelcorrales avatar Mar 21 '13 23:03 raelcorrales

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

piermariacosina avatar May 16 '13 14:05 piermariacosina

Hi guys, did you finally manage to do that ? I tried to set up the same with mCustomScrollbar but it's not working... Thanks

blackthorns avatar Jun 13 '13 08:06 blackthorns

mCustomScrollbar is a piece of crap. Use this, I tested every effect and it worked perfectly: https://github.com/noraesae/perfect-scrollbar

SantzDesign avatar Nov 27 '13 16:11 SantzDesign

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.
  2. 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;

PayBas avatar Feb 07 '14 22:02 PayBas

You can always use iScroll guys.

tomasdev avatar May 09 '14 04:05 tomasdev