How to close the sidebar for mobile with the inertia ja link?
I have a sidebar containing links for the pages.
Build the my portfolio with Laravel vue and inertia, while using inertia link the request works as a ajax for the spa.
Navigation works without page reloading but how could I close the sidebar on the mobile after a successful navigation on the mobile screens ?
Direct DOM manipulation like that doesn't work in Vue, since it uses a virtual DOM. Those changes may get overwritten on the next render.
Hiding the sidebar is probably really easy in a Vue layout, but @shivamyadav didn't say how the sidebar is implemented. Typically it's just a matter of setting some state variable like showSidebar to false.