Experience this code
function AutoPopup() {
setTimeout(function () {
document.getElementById('ac-wrapper').style.display = "block";
}, 5000);
}
#ac-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, .6);
z-index: 1001;
}
#popup {
width: 555px;
height: 375px;
background: #FFFFFF;
border: 5px solid #000;
border-radius: 25px;
-moz-border-radius: 25px;
-webkit-border-radius: 25px;
box-shadow: #64686e 0px 0px 3px 3px;
-moz-box-shadow: #64686e 0px 0px 3px 3px;
-webkit-box-shadow: #64686e 0px 0px 3px 3px;
position: relative;
top: 150px;
left: 375px;
}
<div id="ac-wrapper">
<div id="popup">
<center>
<h2>Automatic Popup Content Here</h2> <input type="submit" name="submit" value="Submit" onClick="AutoPopup()" />
</center>
</div>
</div>
Is there a way to make the popup appear automatically after 5 seconds of page load?