Topic: Error : Ps is not defined when using sidenav

Bidhuri free asked 1 year ago


I am sung below MDB.js * Material Design for Bootstrap 4 * Version: MDB Pro 4.20.0

PS is not defined error coming for sidenav .

Below is js file refrences:

    <script src="~/js/jsnlog.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script>
    <!-- Bootstrap tooltips -->
    <script type="text/javascript" src="~/js/popper.min.js"></script>
    <!-- Bootstrap core JavaScript -->
    <script type="text/javascript" src="~/js/bootstrap.js"></script>

    <!-- MDB core JavaScript -->
    <script type="text/javascript" src="~/js/mdb.js"></script>

    <script asp-append-version="true" src="~/js/jquery.dataTables.min.js"></script>
    <script asp-append-version="true" src="~/js/dataTables.bootstrap4.min.js"></script>
    <script asp-append-version="true" src="~/js/jquery.dataTables.js"></script>
    <script asp-append-version="true" src="~/js/pace.min.js"></script>
    <script asp-append-version="true" src="~/js/Chart.js"></script>
    <script asp-append-version="true" src="~/js/main.js"></script>
    <script type="text/javascript" src="~/js/select2.min.js" asp-append-version="true"></script>
    <script asp-append-version="true" src="~/js/filterSearch.js"></script>
    @*<script asp-append-version="true" src="~/js/projectedReady.js"></script>*@
    <script type="text/javascript" src="~/js/moment.js"></script>

Below is my script code :

$(document).ready(function() {
$(".button-collapse").sideNav(); var el = document.querySelector('.scrolling-navbar'); Ps.initialize(el); });

Getting error for Ps.initialize

Please help me here .

Thanks


Bidhuri free answered 1 year ago


I have found solution please ignore .. Solution is :

I have changed code from Ps.initialize(el);

to var ps = new PerfectScrollbar(el);


Mateusz Lazaru staff commented 1 year ago

I'm glad you were able to solve the problem on your own! In case of other questions, feel free to create new topics.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 4.2.0
  • Device: Laptop
  • Browser: Chrome
  • OS: Window
  • Provided sample code: No
  • Provided link: No