Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

intersection observer api root

const obsCallback = function (entries) {
  entries.forEach(el => console.log(el));
}

const obsOption = {
  root: null,
  threshold: 0.1,
}

const observer = new IntersectionObserver(obsCallback, obsOption);
observer.observe(section1); //Target Section
 
PREVIOUS NEXT
Tagged: #intersection #observer #api #root
ADD COMMENT
Topic
Name
5+9 =