$('#nav-menu').bind("mousedown touchstart", function(){
if ($('#patients-panel').hasClass('open')) {
$('#patients-panel').animate({
left: '-165px',
}, 500);
$('#patients-panel').removeClass('open');
$('#nav-patients').removeClass('active');
}
slideMenu();
$('#menu-panel').toggleClass('open');
$('#nav-menu').toggleClass('active');
swapImage();
});
$('#nav-patients').bind("mousedown touchstart", function(){
if ($('#menu-panel').hasClass('open')) {
$('#menu-panel').animate({
left: '-165px',
}, 500);
$('#menu-panel').removeClass('open');
$('#nav-menu').removeClass('active');
}
slidePatientMenu();
$('#patients-panel').toggleClass('open');
$('#nav-patients').toggleClass('active');
swapImage();
});
I would like to add a 3 sec timer to my Slide out Menu; So, essentially; after the menu ‘Slides Out’ it will slide back in within 3 seconds. How could I write this?
Basically, this is what you need to do, at the end of the callback functions that “show” the menu’s, add this:
This should do the trick.