inuyaksa / jquery.nicescroll

nicescroll plugin for jquery - scrollbars like iphone/ipad
https://nicescroll.areaaperta.com/
3.6k stars 1.67k forks source link

Is nicescrol compatible with Materializecss? #682

Closed gusbemacbe closed 5 years ago

gusbemacbe commented 7 years ago

Hello,

I use Materialize framework and applied nicescroll to tag html, but the scrollbar doesn't get effect.

I think that nicescroll and Materialize are incompatible.

inuyaksa commented 7 years ago

Please, try adding nicescroll to the body element.

gusbemacbe commented 7 years ago

I added body and it didn't get effect either.

inuyaksa commented 7 years ago

Any error in console?

gusbemacbe commented 7 years ago

No, as I checked the console. There is no error.

<script type="text/javascript">
$(function() {  
    $("html").niceScroll();
});
</script>

Is this code correct?

inuyaksa commented 7 years ago

I'm investigating, materailizecss is new for me

gusbemacbe commented 7 years ago

Read, @inuyaksa, read our discussion: https://github.com/Dogfalo/materialize/issues/4984, applying to HTML worked, but to side-navbar, it not worked.

inuyaksa commented 7 years ago

Reply https://github.com/Dogfalo/materialize/issues/4984#issuecomment-316623911

gusbemacbe commented 7 years ago

Ah, somebody suggest me to move sidenav outside navbar and it worked, but the nicescroll is still inside the navbar:

https://codepen.io/gusbemacbe/pen/rwXawx

inuyaksa commented 7 years ago

It seems all works, but your navbar has no others elements to display so scrollbar has hidden. Try to set height: 200px to #slide-out