I have a button that triggers a popup box when clicked. However, I want to add a loading circle with text underneath before the popup appears, and for it to display after 3 seconds. Is this doable?
Here is my current code snippet:
<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">
<div class="btn">Win!</div>
</a>
<div id="light" class="white_content">Congratulations, you've won!<br>Claim your prize now by completing a short survey:<br>
<input type="submit" value="Complete Survey" onclick="location.href='http://mobverify.com/cl.php?id=5c78fd59851bf0c4867c008c9882d808'">
<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'"></a>
</div>
Current style of the popup:
.white_content {
display: none;
position: absolute;
top: 25%;
left: 25%;
width: 50%;
height: 150%;
padding: 16px;
border: 2px solid white;
background-color: #2e3141;
z-index:1002;
overflow: auto;
text-align: center;
color: white;
border-radius: 30px;
}