Since you just hide the popup using css opacity, you can just use jquery when loading the page to display the popup or disappear if you want to add some animation.
It's also probably nice to set the popup to none in css, or you may run into problems at a later stage. You can do something like:
.modalDialog { //added display none on element display:none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 99999; //opacity: 0; -webkit-transition: opacity 400ms ease-in; -moz-transition: opacity 400ms ease-in; transition: opacity 400ms ease-in; pointer-events: none; } $(document).ready(function() { //Use jQuery to show the popup $('.modalDialog').show(); //Alternativly use jQuery to fadeIn the popup $('.modalDialog').fadeIn() })
Final updated code: https://jsfiddle.net/q4n7p0jx/1/
source share