Home  »  CodeGuidesLibrariesProgrammingSnippetsTechnology   »   Show Modal After 5 Seconds Delay on Page Load in Bootstrap 5 JavaScript

Show Modal After 5 Seconds Delay on Page Load in Bootstrap 5 JavaScript

Posted: January 2, 2023 | by Michael Bright

This example shows how to show a modal after 5 seconds delay on page load in Bootstrap 5.

setTimeout(function() {
    $('#myModal').modal();
}, 5000);

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.