Learning Essentials:
1. Loading mode
2. List of properties
3. Event List
4. Method List
This section focuses on the use of the resizeable (resizing) component in Easyui, where resizing means that elements can be dragged and resized, and this component does not depend on other components.
A Load mode
All components in Easyui are loaded in two different ways
Class Load Mode
<!DOCTYPE HTML><HTML><Head><title>JQuery Easy UI</title><MetaCharSet= "UTF-8" /><Scripttype= "Text/javascript"src= "Easyui/jquery.min.js"></Script><Scripttype= "Text/javascript"src= "Easyui/jquery.easyui.min.js"></Script><Scripttype= "Text/javascript"src= "Easyui/locale/easyui-lang-zh_cn.js" ></Script><Scripttype= "Text/javascript"src= "Js/index.js"></Script><Linkrel= "stylesheet"type= "Text/css"href= "Easyui/themes/default/easyui.css" /><Linkrel= "stylesheet"type= "Text/css"href= "Easyui/themes/icon.css" /></Head><Body><DivID= "box"class= "Easyui-resizable"data-options= "maxwidth:800,maxheight:600"style= "width:100px;height:100px;border:1px solid #ccc;"></Div></Body></HTML>
JS Load mode
$ (' #box '). Resizable ({ maxWidth:+, maxheight:+,});
Two Property List
//Property Settings$ (' #box '). Resizable ({disabled:true,//Disabled Boolean default is False, set to True to disable adjustmentHandles: ' SE ',//handles string defaults to N,e,s,w,ne,se,sw,nw,all, which declares the orientation of the adjustment, n indicates north, e means east, s means South, W indicates West, and NE, SE, SW, NW, and allMINWIDTH:200,//minWidth Number Default 10, minimum width when resizedMINHEIGHT:200,//minheight Number Default 10, Min. height when resizingMAXWIDTH:500,//maxWidth Number Default 10000, maximum width when resizingMAXHEIGHT:350,//maxheight Number Default 10000, maximum height when resizedEDGE:20,//Edge Number Default 5, Border edge trigger size});
Three Event List
$ (' #box '). Resizable ({ function (e) { console.log (' Start changing size! '); }, function (e) { console.log (' Resize time trigger! '); // return false; }, function (e) { console.log (' triggers when resizing is stopped! '); },});
Four Method List
// returns the Property object Console.log ($ (' #box '). Resizable (' options ')); method Name parameter description options None return Property object enable None to turn on adjust function disable None Disable the adjustment function // prohibit adjustment of $ (' #box '). Resizable (' disable '); // Enable place $ (' #box '). Resizable (' Enable 'true;
Jquery-easyui----resizable (resizing) component