Closed n3t closed 5 years ago
Hi Pavel, thanks for that. I already thought of that, but unfortunately the triggerButton is required. I'll check it out and get back.
Did you try to use the Cart-Button as triggerButton instead?
Hi,
the point is, that there is no Cart button opening offcanvas. The cart button redirects user to cart already, offcanvas is displayed just after he adds something to cart from AJAX event only. So no control to display offcanvas manually by user...
Pavel
Hi Pavel,
can you test it if this works and let me know https://github.com/vmitsaras/js-offcanvas/blob/40-offcanvas-without-triggerbutton/dist/_js/js-offcanvas.pkgd.js Thanks
Hi,
sorry for late reply, I was quite busy last few days. Yes, this works like a charm, thank you very much.
Pavel
Hi,
when creating offcanvas without triggerButton specified, an error 'Element required to initialize object' is raised.
I use this code, as offcanvas in my case is not triggered by any alement, but appears as feedback to AJAX action (after user add something to cart).
I can bypass this issue by creating invisible element like this
Is this expected behavior, or an issue? Would be nice to have option to omit triggerButton, when not needed.
thanks
Pavel