Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kanety/jquery-simple-resize
https://github.com/kanety/jquery-simple-resize
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kanety/jquery-simple-resize
- Owner: kanety
- License: mit
- Created: 2019-06-09T03:07:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-21T01:16:11.000Z (about 5 years ago)
- Last Synced: 2024-12-25T04:04:43.815Z (23 days ago)
- Language: JavaScript
- Size: 35.2 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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).