mirror of
https://git.topisto.net/tibo/template.git
synced 2026-03-31 17:19:10 +00:00
commit 20240914
This commit is contained in:
@@ -3,10 +3,10 @@ const handleFooterIntersection = function (entries) {
|
||||
// Loop through all the observed elements
|
||||
entries.forEach(entry => { // Check if the element is intersecting the viewport
|
||||
if (entry.isIntersecting) {
|
||||
console.log("The footer is visible in the viewport");
|
||||
msgConsole('IntersectionObserver','The footer is visible in the viewport');
|
||||
if (typeof footerIsNowVisible === 'function') footerIsNowVisible(entry);
|
||||
} else {
|
||||
console.log("The footer is invisible in the viewport");
|
||||
msgConsole('IntersectionObserver','The footer is invisible in the viewport');
|
||||
if (typeof footerIsNowInvisible === 'function') footerIsNowInvisible(entry);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user