Open Modal After Timeout jQuery timeoutModal - Download Auto Open A Modal After A Specific Timeout - jQuery timeoutModal

Download Auto Open A Modal After A Specific Timeout – jQuery timeoutModal

Posted on

This time I will share jQuery Plugin and tutorial about Auto Open A Modal After A Specific Timeout – jQuery timeoutModal, hope it will help you in programming stack.

Open Modal After Timeout jQuery timeoutModal - Download Auto Open A Modal After A Specific Timeout - jQuery timeoutModal
File Size: 6.7 KB
Views Total: 4374
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

timeoutModal is a jQuery plugin to create a customizable, cookie-enabled modal popup that automatically reveals after a timeout you specify.

The timeout modal is dismissible, and stays dismissed for 24 hours (based on the cookies).

Ideal for session timeout warning, user idle alert and more.

How to use it:

1. Include the necessary jQuery library and jQuery cookies plugin on the web page.

2         integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
3         crossorigin="anonymous"></script>

2. Build the html for the timeout modal.

01 <div class="timeoutPopup timeoutPopup_hidden" id="timeoutPopup">
02   <div class="timeoutPopup__wrapper">
03     <div class="timeoutPopup__close"></div>
04     <div class="timeoutPopup__content">
05       ...
06       Modal Content Here
07       ...
08     </div>
09   </div>
10 </div>

3. That’s it. The modal will auto reveal after 10 seconds when the page is completely loaded. To override the default timeout, follow this step:

1 // 10 seconds
2 var openTimeoutPopup = new TimeoutPopup('#timeoutPopup', 10);
3  
4 // init
5 openTimeoutPopup.init();

This awesome jQuery plugin is developed by Yorgigiri. For more Advanced Usages, please check the demo page or visit the official website.

source : jquery.net