Topic: Getting "$(...).sideNav is not a function" error when trying to use sidenav()
<script src="/js/mdb.min.js"></script>Right after this I added this:
<script>
// SideNav Button Initialization
$(".button-collapse").sideNav({
edge: 'left'
});
// SideNav Scrollbar Initialization
var sideNavScrollbar = document.querySelector('.custom-scrollbar');
Ps.initialize(sideNavScrollbar);
</script>
I copied and pasted the entire navbar example from your website, but to save room, I'm only pasting the first couple of lines:
<!-- Sidebar navigation --> <div id="slide-out" class="side-nav"> <ul class="custom-scrollbar">...No matter what I do, I get the "$(...).sideNav is not a function" error in the console. I need to have this working or most of the reason I purchased mdb is unjustified. Please advise!
petrakid
pro premium answered 3 years ago
Resolved
- User: Pro
- Premium support: Yes
- Technology: jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: Yes
- Provided link: No