1
0
mirror of synced 2024-11-21 21:06:07 +03:00
api-client-php/js/template.js
2024-10-18 07:10:58 +00:00

18 lines
440 B
JavaScript

(function(){
window.addEventListener('load', () => {
const el = document.querySelector('.phpdocumentor-on-this-page__content')
if (!el) {
return;
}
const observer = new IntersectionObserver(
([e]) => {
e.target.classList.toggle("-stuck", e.intersectionRatio < 1);
},
{threshold: [1]}
);
observer.observe(el);
})
})();