Methods
init()
- Source:
Start tracking
percentageSeen() → {Number}
- Source:
Percentage of document that appears on user's viewport
Returns:
- Type
- Number
percentageSeenRounded(granularityopt) → {Number}
- Source:
Percentage of document that appears on user's viewport rounded to given granularity
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
granularity |
Number |
<optional> |
10
|
granularity of rounding |
Returns:
- Type
- Number
store(y)
- Source:
Save scroll y coordinate
Parameters:
| Name | Type | Description |
|---|---|---|
y |
Number | y-coordinate to store |