npm.io
0.0.3 • Published 10 years ago

client-rect-notifications

Licence
MIT
Version
0.0.3
Deps
1
Vulns
0
Weekly
0

client-rect-notifications

Provides notifications for changes in the position of an HTML element relative to the viewport.

Demo

Install

$ npm install --save-dev client-rect-notifications

Usage

var htmlElement = ...;
var clientRectNotifications = require('client-rect-notifications');
clientRectNotifications.add(
    htmlElement ,
    {
        completelyOutOfView : function() {
            // do something
        }, 
        completelyInView : function() {
            // do something
        },
        mostlyInView : function() {
            // do something
        },
        partiallyInView : function() {
            // do something
        }
    }
);

Build

$ git clone ...
$ npm install
$ grunt serve

// Deployed to http://localhost:9001/

Keywords