Gustavo Luigi 2024-01-10 18:02:25 -03:00
parent 5922c1b25a
commit 5952faf21b
1 changed files with 4 additions and 4 deletions

View File

@ -5,9 +5,9 @@
<style>
.form-anchor{
opacity:0;
transition: opacity .6s;
}
.form-anchor.show{
transition: opacity 1s;
opacity:1;
}
</style>
@ -232,7 +232,7 @@
if (entry.isIntersecting) {
// Remove the element to remove
elementToRemove.classList.remove('show');
setTimeout(() => elementToRemove.style.display = 'none', 1000);
setTimeout(() => elementToRemove.style.display = 'none', 1200);
} else {
const fixedElementRect = elementToRemove.getBoundingClientRect();
const referenceElementRect = targetElement.getBoundingClientRect();
@ -240,12 +240,12 @@
if (fixedElementRect.bottom < referenceElementRect.top) {
// Show the element to remove
elementToRemove.style.display = 'block';
setTimeout(() => elementToRemove.classList.add('show'), 1000);
setTimeout(() => elementToRemove.classList.add('show'), 1200);
} else {
// Hide the element to remove
//elementToRemove.style.display = 'none';
elementToRemove.classList.remove('show');
setTimeout(() => elementToRemove.style.display = 'none', 1000);
setTimeout(() => elementToRemove.style.display = 'none', 1200);
}
}
// Stop observing once it's removed (optional)