A module for detecting whether an element is visible.
$ npm install --save bv-ui-pixels-displayed
var bvUIPixelsDisplayed = require('bv-ui-pixels-displayed');
var pixelsDisplayed = bvUIPixelsDisplayed(window, document);
if (pixelsDisplayed(element) > 0) {
// element is visible
}
MIT © Bazaarvoice