Fancy animation zur image section wenn generate butten gepresst wurde.

This commit is contained in:
2023-11-16 22:47:03 +01:00
parent a4e6cc4518
commit 74fe4ca4a1
2 changed files with 82 additions and 58 deletions

View File

@ -14,6 +14,12 @@
window.addEventListener('scroll', animateElements);
// Initialer Aufruf für den Fall, dass Elemente bereits sichtbar sind
animateElements();
}
function scrollToElement(elementId) {
var element = document.getElementById(elementId);
if (element) {
element.scrollIntoView({ behavior: 'smooth' });
}
}