Topic: Is it possible apply mdbootsrap scrollbar to as main scrollbar?

mirnesc92 pro asked 6 years ago


I want to apply \'scrollbar scrollbar-primary\' to browsers scrollbar, but it does not seem to be working. Is this possible?

https://mdbootstrap.com/javascript/smooth-scroll

I have tried ...

<html class="scrollbar scrollbar-primary">
   <body class="force-overflow">
   </body>
</html>

pre Developer free answered 4 years ago


index.html:886 Uncaught ReferenceError: Ps is not defined at index.html:886 (anonymous)

There is a error. What is this ? I don t understand, i can t add this scroll to my web site.


Grzegorz Bujański staff commented 4 years ago

Hi. Perfect scrollbar is a pro component and doesn't work in free version.



It is not recommended to use perfect scrollbar as the main scrollbar. However, if you really need to do this just add class to your `<body>` tag and then initialize the scrollbar. Example:

<body class="scrollbar">
<!-- Your code -->
<!-- jQuery, popper, bootstrap, MDB -->
<script>
var el = document.querySelector('.scrollbar');
Ps.initialize(el);
</script>
</body>



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags