Submit your widget

jquery-elementresize - Provides a custom jQuery event to detect resizing of a positioned (non-static) element.

Created 5 years ago   Views 1483   downloads 775    Author rbtbar
View DemoDownload
17
Share |

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 AMD, Node/CommonJS, Browser globals is baked in.