项目作者: tcouther

项目描述 :
Monitor page section views with event listeners for section engagement and disengagement
高级语言: JavaScript
项目地址: git://github.com/tcouther/SectionViewTracker.git
创建时间: 2017-09-12T00:16:08Z
项目社区:https://github.com/tcouther/SectionViewTracker

开源协议:

下载


Section View Tracker v1.0

The Section View Tracking Script monitors Y axis scroll events to signal page section engagement.
Events listeners are set on sections that trigger when the section element is scrolled in view or out of view.

This functionality can be used to trigger animated effects, analytics data tracking, or asynchronous data fetching.

Events

  • “onEngaged” : When a section is in view or ‘engaged’
  • “onUngaged” : When a section is moved out of view or ‘disengaged’

On the index page, you’ll see a pretty good example of what you can do with a simple implementation.

Hope this saves some time for someone =)