How can I observe how the current section is viewed by a user on a web page?

When a user views a web page, they scroll through different sections of the page by scrolling. In the Bootstrap documentation , the bs-docs-sidenavList Item changes color to reflect which section is currently β€œactive” (displayed on the screen).

  • Does this type of observation have a name (or names)?
  • Does the DOM have any properties that track the location of an element?
  • If not, are there any common plugins / small libraries to take advantage of this information?
+4
source share
1 answer

Source: https://habr.com/ru/post/1624868/


All Articles