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.