je
jquery-elementresize
npm i jquery-elementresize
je

jquery-elementresize

jquery-elementresize is a simple jQuery plugin for detecting ALL changes to the size of ANY positioned element

by Robert Bar

0.2.2 (see all)License:MITTypeScript:Not Found
npm i jquery-elementresize
Readme

jQuery Element Resize Plugin

A jQuery plugin that adds cross-browser element resize support.

In order to use the plugin, simply bind the elementResize event to a positioned element.

It also provides two helper methods called elementResize and unelementResize that act just like other event helper methods in jQuery.

// using on
$('#my_elem').on('elementResize', function(event) {
    var elem = $(this),
        width = elem.width(), 
        height = elem.height();
    console.log(width, height);
});

// using the event helper
$('#my_elem').elementResize(function(event) {
   var elem = $(this),
        width = elem.width(), 
        height = elem.height();
    console.log(width, height);
});

Support for UMD modules

Support for AMD, Node/CommonJS, Browser globals is baked in.

No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate