@kanety/jquery-simple-resize

0.3.0 • Public • Published

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({
  bottomRight: true
});

Options

Build resize handler automatically in the resizable element:

$('#resize').simpleReize({
  top: true,
  bottom: true,
  left: true,
  right: true,
  topLeft: true
  topRight: true
  bottomLeft: true
  bottomRight: 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.

Package Sidebar

Install

npm i @kanety/jquery-simple-resize

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

34.4 kB

Total Files

16

Last publish

Collaborators

  • kanety