final implementation of CTA banner

This commit is contained in:
2024-10-23 16:23:01 +02:00
parent 7a55c71c2f
commit d3af47e722
4 changed files with 23 additions and 13 deletions

16
js/cta.js Normal file
View File

@@ -0,0 +1,16 @@
document.addEventListener("DOMContentLoaded", function() {
const cta = document.querySelector(".cta");
const nav = document.querySelector("nav");
if (cta && nav) {
setTimeout(() => {
cta.style.transition = "height 0.5s ease, opacity 0.5s ease";
cta.style.height = "0";
cta.style.opacity = "0";
setTimeout(() => {
nav.style.setProperty("margin-top", "1%", "important");
}, 500);
}, 10000);
}
});