@odopod/odo-viewport

    1.1.1 • Public • Published

    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.

    Install

    npm i @odopod/odo-viewport

    DownloadsWeekly Downloads

    9

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    109 kB

    Total Files

    18

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar