How to trigger the event when the page is scrolled to the designated location?

how to do this: the user scrolls down the page window, triggers an event when div is about to enter the view. Each div location of ps: is different, so you need to trigger flexibly.


get the position of the div you want to operate relative to the top, listen for scrolling events, and iterate through each div, you want to operate to see if the conditions are met
of course you can use the latest API, IntersectionObserver to do this

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaa26a-1fb1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaa26a-1fb1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?