WIP
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
const observer = new IntersectionObserver((entries) => {
|
||||
entries.forEach(entry => {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add('visible');
|
||||
} else {
|
||||
entry.target.classList.remove('visible');
|
||||
}
|
||||
});
|
||||
}, {
|
||||
threshold: 0.1 // adjust as needed
|
||||
});
|
||||
|
||||
document.querySelectorAll('.watch-vp').forEach(el => {
|
||||
observer.observe(el);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user