WIP
This commit is contained in:
7
dist/app.js
vendored
7
dist/app.js
vendored
@@ -10,13 +10,16 @@
|
||||
var observer = new IntersectionObserver(function (entries) {
|
||||
entries.forEach(function (entry) {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add('visible');
|
||||
entry.target._inViewportTimeout = setTimeout(function () {
|
||||
entry.target.classList.add('visible');
|
||||
}, 250);
|
||||
} else {
|
||||
clearTimeout(entry.target._inViewportTimeout);
|
||||
entry.target.classList.remove('visible');
|
||||
}
|
||||
});
|
||||
}, {
|
||||
threshold: 0.1 // adjust as needed
|
||||
threshold: 0.5 // adjust as needed
|
||||
});
|
||||
document.querySelectorAll('.watch-vp').forEach(function (el) {
|
||||
observer.observe(el);
|
||||
|
||||
Reference in New Issue
Block a user