Setting up scroll monitor
In the last video, we added a sensor element to our page, and we added the scroll monitor library as well.
In this video, we'll use scroll monitor to trigger a function when the sensor is in the viewport.
Setting up scroll monitor
Since we've added the scroll monitor script, we now have a a global object scrollMonitor
which has a method create
which creates a listener on an element in the page.
Click to load comments...