-1

I used this code:

$("body").mCustomScrollbar({
      theme: "3d-thick-dark",
      scrollButtons: { enable: true }
});

mcustomscrollbar work on another elements. but doesn't work on body or html element!

behi
  • 73
  • 8
  • *"does not work"* - please be more specific. Any browser console errors? Network tab errors? Does something, but not a dark 3d scrollbar? Do other options work? Did you include the 2x .js files? Did you include the css? Have a read of [mcve] - specifically "complete". – freedomn-m Nov 11 '19 at 15:52
  • Which version of jquery / mcustomscrollbar are you using? – freedomn-m Nov 11 '19 at 15:56
  • mcustomscrollbar work on another elements. just doesn't work on body or html element. – behi Nov 11 '19 at 16:23
  • Thanks, My problem was solved. – behi Nov 11 '19 at 16:59
  • Related: https://stackoverflow.com/a/22074687/2181514 – freedomn-m Nov 11 '19 at 17:51

1 Answers1

0

The problem was solved. I just had to use the following code in Css.

html, body {
  height: 100%;
}
behi
  • 73
  • 8