setTimeout(function() {
toggleModal();
}, 3000); // waits 3 seconds after page loads and then toggles the modal
1 Like
or the shorter version:
setTimeout(toggleModal, 3000);
1 Like
thank you so much your answer was super useful, regards