- Dialog popup loading while page loading. To load the dialog popup after few seconds, we could use the below method.
- Dialog popup will display while page loading, we disable it through style while page loading and we could display it after few seconds through jquery.Disable all popup view through style as like below. Class will change based on your implementation.
<style> .newsletter_main { display: none; } .ui-dialog-titlebar-close { display: none; } .ui-widget-overlay { display: none; }
Also use below script to display the popup while page loading and enable the display view after few seconds from jQuery.
<script> /* Load the dialog popup while page loading */ jQuery( document ).ready(function() { jQuery( "#newsletter" ).dialog({ closeOnEscape: false, show: 'fade', modal: true }); }); /* Display the popup content after few seconds */ setTimeout(function(){ jQuery( ".newsletter_main" ).css({"display":"block"}); jQuery( ".ui-dialog-titlebar-close" ).css({"display":"block"}); jQuery( ".ui-widget-overlay" ).css({"display":"block"}); }, 3000); </script> /* Popup content Div */ <div id="newsletter"> Content Here </div>