This code is used to create popups on websites. After clicking on the close button once, the popup box goes away but after 3 seconds the fire comes again. I only want this 1 time, not over and over again
$(document).ready(function(){
setTimeout(function(){
$('#popUp').css('display','block'); }, 3000);
});
$('.close-popup').click(function(){
$('#popUp').css('display','none');
});
<div id="popUpmain">
<form action="">
<div id="popUp" style="display:none">
<h1 class="popUp-heading">Sign Up</h1>
<input type="text" class="pop-up-name" placeholder="Your Name">
<input type="text" class="pop-up-email" placeholder="Email">
<input type="text" class="pop-up-number" placeholder="Number">
<select name="Select Product" id="" class="popup-select">
<option value="Select Product active">Select Product</option>
<option value="Mattress">Mattress</option>
<option value="Select Product active">Comforter</option>
<option value="Select Product active">pillow</option>
</select>
<input type="submit" class="popup-btn close-popup">
<button class="close-btn close-popup">Not Now</button>
</div>
</form>
</div>