Topic: Updgrade to 4.8.0 PRO
                  
                  it@strong.tv
                  pro
                  asked 6 years ago
                
After upgrading to 4.8.0 i get this error when loading a page. ReferenceError: Ps is not defined
This is caused by the scrollbar initialization which i do like:
// Side nav activating
$(".button-collapse").sideNav();
var el = document.querySelector('.custom-scrollbar');
Ps.initialize(el);
My code has not changed, only a new mdb version so this must be caused by the new version.
                      
                      Bartłomiej Malanowski
                      staff
                        answered 6 years ago
                    
As we mentioned on the changelog, In MDB 4.7.7, we've updated Perfect Scrollbar to its most recent version, where the initialization code has changed To make it work please change your code to this one:
$(".button-collapse").sideNav();
  var el = document.querySelector('.custom-scrollbar');
  var ps = new PerfectScrollbar(el);
                    
                      FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
 - Premium support: No
 - Technology: MDB jQuery
 - MDB Version: 4.7.7
 - Device: Laptop
 - Browser: All
 - OS: Windows 10
 - Provided sample code: No
 - Provided link: No