this is the script I have in place to show a popup and then on click disable it. The popup show when scrolling past a certain limit and then stays until the close image is clicked.
<script>
$(document).ready(function(){
$('#popupbackground').hide();
$('#popup').hide();
$('img#close').hide();
$(window).scroll(function(){
if($(document).scrollTop() > 325){
$('#popupbackground').fadeIn(750);
$('#popup').fadeIn(750);
$('img#close').fadeIn(750);
}
});
$("img#close").click(function(){
$("#popupbackground").hide();
$("#popup").hide();
$("img#close").hide();
});
});
</script>
This works fine but the problem I have now is that when the close img is clicked and the popup disappears, it re-appears when the user scrolls again.
What is an easy and lightweight way to disable the re-appearance of the popup?