You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using jQuery to force open the offcanvas on page load, but this is done using the standard sliding animation and when paging through the site multiple sliding animations become distracting.
Is there a way to force offCanvas to abandon the sliding animation for a particular open operation OR to make it load in an opened state?
Thanks
// Define offcanvas-js dataOffcanvas object
var dataOffcanvas = $('#off-canvas').data('offcanvas-component');
// Responsive Open/close
responsiveHamburger = function() {
if (window.innerWidth > 768) { dataOffcanvas.open(); }
else { dataOffcanvas.close(); }
}
// If window width > 768px then automatically open hamburger menu, wait for resize to stop
var responsiveHamburger_lazy = _.debounce(responsiveHamburger,100);
$(window).resize(responsiveHamburger_lazy);
// Remove d-none from aside one the page is fully loaded (fixes flickering)
$("aside").removeClass("d-none");
// Open/Close based on screen size on load
responsiveHamburger();
The text was updated successfully, but these errors were encountered:
Hi! Thank you for the lovely plugin.
I am using jQuery to force open the offcanvas on page load, but this is done using the standard sliding animation and when paging through the site multiple sliding animations become distracting.
Is there a way to force offCanvas to abandon the sliding animation for a particular open operation OR to make it load in an opened state?
Thanks
The text was updated successfully, but these errors were encountered: