element-resize-event-evo

    2.1.0 • Public • Published

    element-resize-event

    Library to make it easy to listen for element resize events

    Code borrowed from a blog post by backalleycoder.com.

    Install

    npm install element-resize-event

    Usage

    var elementResizeEvent = require('element-resize-event');
     
    var element = document.getElementById("resize");
     
    elementResizeEvent(element, function() {
      console.log("resized!");
      console.log(element.offsetWidth);
    });

    Unbinding The Event Listener

    var unbind = require('element-resize-event').unbind;
     
    unbind(element);

    Install

    npm i element-resize-event-evo

    DownloadsWeekly Downloads

    0

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    11.5 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar