1.1.1 • Published 6 years ago

@odopod/odo-viewport v1.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Odo Viewport

Viewport enter and exit monitoring for elements.

Install

npm install @odopod/odo-viewport --save

Quick Start

import OdoViewport from '@odopod/odo-viewport';

OdoViewport.add({
  element: document.getElementById('demo-enter-exit'),
  enter: function () {
    this.setAttribute('in-view', true);
  },
  exit: function () {
    this.removeAttribute('in-view');
  }
});

Documentation

Visit the Odo component directory for demos, code examples, and documentation.