https://github.com/bazaarvoice/bv-ui-pixels-displayed
A module for detecting whether an element is visible.
https://github.com/bazaarvoice/bv-ui-pixels-displayed
Last synced: about 1 year ago
JSON representation
A module for detecting whether an element is visible.
- Host: GitHub
- URL: https://github.com/bazaarvoice/bv-ui-pixels-displayed
- Owner: bazaarvoice
- License: other
- Created: 2015-02-13T23:24:28.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-12-08T16:49:00.000Z (over 10 years ago)
- Last Synced: 2025-01-23T09:10:00.693Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 28
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# bv-ui-pixels-displayed
[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Dependency Status][daviddm-url]][daviddm-image]
> A module for detecting whether an element is visible.
:warning: This functionality has been added to [bv-ui-core](https://github.com/bazaarvoice/bv-ui-core) and all further improvements/changes will be carried out in [bv-ui-core](https://github.com/bazaarvoice/bv-ui-core) repository.
Please consider using bv-ui-core version *0.6.0* or later.
## Install
```sh
$ npm install --save bv-ui-pixels-displayed
```
## Usage
```js
var bvUIPixelsDisplayed = require('bv-ui-pixels-displayed');
var pixelsDisplayed = bvUIPixelsDisplayed(window, document);
if (pixelsDisplayed(element) > 0) {
// element is visible
}
```
## License
MIT © [Bazaarvoice](http://bazaarvoice.com)
[npm-url]: https://npmjs.org/package/bv-ui-pixels-displayed
[npm-image]: https://badge.fury.io/js/bv-ui-pixels-displayed.svg
[travis-url]: https://travis-ci.org/bazaarvoice/bv-ui-pixels-displayed
[travis-image]: https://travis-ci.org/bazaarvoice/bv-ui-pixels-displayed.svg?branch=master
[daviddm-url]: https://david-dm.org/bazaarvoice/bv-ui-pixels-displayed.svg?theme=shields.io
[daviddm-image]: https://david-dm.org/bazaarvoice/bv-ui-pixels-displayed