Skip to content

kanety/jquery-simple-resize

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published