https://github.com/realign/j-resize
https://github.com/realign/j-resize
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/realign/j-resize
- Owner: ReAlign
- Created: 2017-11-11T10:55:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-12T13:13:16.000Z (over 7 years ago)
- Last Synced: 2025-03-14T06:34:37.284Z (2 months ago)
- Language: JavaScript
- Size: 43 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# j-resize
> a jQuery plugin for resize element
## @params
```
jResize(opt);
``````
minW: 100, // 最小宽度
maxW: 300, // 最大宽度
minH: 100, // 最小高度
maxH: 300, // 最大高度
noX: false, // X 轴不可拖动
noY: false, // Y 轴不可拖动
callback: // 回调函数 obj (当前元素改变后的宽高,如属性未改变,则为 null)obj = {
width: null,
height: null
}
```## Usage
```
// es6: npm install jquery && j-resize
import $ from "jquery";
require("j-resize");// browser:
$(function() {
$(".drag").jResize({
minW: 150,
minH: 150,
maxW: 500,
maxH: 500,
noY: true,
callback: function(obj) {
console.dir(obj);
}
});
})
```