Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kanety/jquery-simple-resize


https://github.com/kanety/jquery-simple-resize

Last synced: 8 days ago
JSON representation

Awesome Lists containing this project

README

        

# 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:

```html


text


```

Then run:

```javascript
$('#resize').simpleReize({
bottomRight: true
});
```

### Options

Build resize handler automatically in the resizable element:

```javascript
$('#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:

```html


text



```

```javascript
$('#resize').simpleReize({
bottom: '#resize_bottom'
});
```

Store current width and height in the web storage:

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

### Callbacks

```javascript
$('#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](http://opensource.org/licenses/MIT).