Easyui's base plugin learning has been made to resizable (scalable). Or look at the API of Easyui official website.
Resiable
As its literal meaning (scalable), resiable is mainly to expand some HTML elements to be scalable, Panel, window, etc., do not believe that the Easyui loader source code can be known! (window is dependent on resizable) or on the official website of the descriptive narrative.
Overrides the default $.fn.resizable.defaults.
Property
Name |
Type |
Descriptive narrative information |
Default value |
Disabled |
Boolean |
Assuming true indicates the ability to scale |
False |
Handles |
String |
implies the direction of the stretch, ' n ' indicates a stretch to the north, ' E ' indicates to the east |
N,e,s,w,ne,se,sw,nw,all |
MinWidth |
Number |
Min. width after scaling |
10 |
MinHeight |
Number |
Min. height after scaling |
10 |
MaxWidth |
Number |
The maximum width after zooming |
10000 |
MaxHeight |
Number |
Min. width after zooming |
10000 |
Edge |
Number |
The width of the zoom, how much can be scaled from the edge |
5 |
Event
Name |
Number of references |
Descriptive narrative information |
Onstartresize |
E |
Will be triggered when the zoom is started |
OnResize |
E |
The resizing period is triggered when the return false,dom element does not play the actual scaling action |
Onstopresize |
E |
Actions that are triggered when scaling is stopped |
Method
Name |
Number of references |
Descriptive narrative information |
Options |
None |
Returns the Resiable Parameter object |
Enable |
None |
Ability to adjust size |
Disable |
None |
Size cannot be resized |
How to use
1. Create with HTML tags:
<div class= "easyui-resizable" style= "width:100px;height:100px;border:1px solid #ccc;" data-options= "maxwidth:800,maxheight:600" ></div>
2. Use JS script to create:
<div id= "RR" style= "width:100px;height:100px;border:1px solid #ccc;" ></div>$ (' #rr '). Resizable ({ maxwidth:800, maxheight:600});
Demo
The same official site of the demo, a look will understand!
<! DOCTYPE html>
Well, that's it, I'm too lazy to paste the URL!
Independent website: liangtao.sinaapp.com/?p=200
Easyui Basic Primer resiable (scalable)