Don't restart pop-up animation on page reload

This commit is contained in:
Blerim Sheqa 2024-04-26 12:26:55 +02:00
parent 80765cf511
commit 82d4845978
1 changed files with 4 additions and 1 deletions

View File

@ -45,7 +45,10 @@
});
$(document).ready(function() {
$('#popup-window').delay(3000).animate({'margin-right':'0px'},1000);
if (sessionStorage.getItem("animationDone") != "done") {
$('#popup-window').delay(3000).animate({'margin-right':'0px'},1000);
sessionStorage.setItem("animationDone", "done");
}
});
</script>