Posts viewportUtil
Post
Cancel

viewportUtil

Utils for the viewport

1
2
3
4
5
import viewportUtil from '@benline/viewportUtil';

// or import what you want

import { isTheElementInViewPort } from '@benline/viewportUtil'

isTheElementInViewPort()

Tests a single element for visibility within the viewport.

callElementsInViewport()

Tests all tracked elements, and invokes callback for visible elements

trackElement()

Adds an element to the trackable queue.

refresh()

Refreshes the viewport by clearing cached dimensions, and then re-checking all elements.

View Repo

Trending Tags
Contents

Trending Tags