🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

A simple and lightweight jQuery resizer plugin for handling custom resizing of DOM elements within the document.

Resize

Documentation

jquery-simple-resize

A jquery plugin for simple resizable element.

Dependencies

  • jquery

Installation

Install from npm:

$ npm install @kanety/jquery-simple-resize --save 

Usage

Build html as follows:

<div id="resize">   <div>text</div> </div>

Then run:

$('#resize').simpleReize({   corner: true });

Options

Build resize handler automatically in the resizable element:

$('#resize').simpleReize({   top: true,   bottom: true,   left: true,   right: true,   corner: true });

Specify selector out of the resizable element:

<div id="resize">   <div>text</div> </div> <div id="resize_bottom"></div>
$('#resize').simpleReize({   bottom: '#resize_bottom' });

Store current width and height in the web storage:

$('#resize').simpleReize({   store: 'session',  // or 'local'   storeKey: 'YOUR_KEY' });

Callbacks

$('#resize').simpleResize({   ... }).on('resize:start', function(e, $handler) {   ... }).on('resize:move', function(e, $handler) {   ... }).on('resize:end', function(e, $handler) {   ... });

License

The library is available as open source under the terms of the MIT License.


You May Also Like