Last active
February 8, 2022 22:52
-
-
Save wplit/aad33f39d94fb783402d7c3b0a45699f to your computer and use it in GitHub Desktop.
open offcanvas after page load and after delay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($) { | |
let offCanvas = '.my-offcanvas'; // Change to your offcanvas selector (class or ID) | |
let delay = 1000; // Number of ms to wait before opening offcanvas | |
setTimeout(function(){ | |
/* Add the classes to open the offcanvas */ | |
$('html,body').addClass('off-canvas-toggled'); | |
$(offCanvas).addClass('oxy-off-canvas-toggled'); | |
}, delay); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment