Evening all, i’m trying to make a side navigation and am getting the following error in the devtools console on some pages but not all:
Uncaught ReferenceError: slideout is not defined
.
This error then prevents the sidenav from working.
I’ve got the side nav in my layouts file as such: layouts.side-navigation
and have included it in my layouts.app file in the body.
<div
x-data="slideout()"
x-cloak
@open-nav-side-menu.window="open = $event.detail.open"
@keydown.window.tab="usedKeyboard = true"
@keydown.escape="open = false"
x-init="init()"
class="z-40">
<div
x-show.transition.opacity.duration.200="open"
@click="open = false"
class="fixed inset-0 bg-black bg-opacity-50"></div>
<div
class="fixed transition duration-200 right-0 top-0 transform w-3/4 sm:max-w-xs md:max-w-md h-screen bg-gray-900 overflow-y-scroll"
:class="{'translate-x-full': !open}">
I’m pretty new to alpine & livewire so any advice would be greatly appreciated on what might be causing this.
Any questions let me know.
Many thanks in advance.