Skip to content

bazaarvoice/bv-ui-pixels-displayed

Repository files navigation

bv-ui-pixels-displayed

NPM version

Build Status

Dependency Status

A module for detecting whether an element is visible.

⚠️ This functionality has been added to bv-ui-core and all further improvements/changes will be carried out in bv-ui-core repository.

Please consider using bv-ui-core version 0.6.0 or later.

Install

$ npm install --save bv-ui-pixels-displayed

Usage

var bvUIPixelsDisplayed = require('bv-ui-pixels-displayed');
var pixelsDisplayed = bvUIPixelsDisplayed(window, document);

if (pixelsDisplayed(element) > 0) {
  // element is visible
}

License

MIT © Bazaarvoice

About

A module for detecting whether an element is visible.

Resources

License

Stars

Watchers

Forks

Packages

No packages published