HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
jQuery EasyUI provided for creating cross-browser web pages complete set of components, including powerful datagrid (data grid), treegrid (tree form), panel (Panel), combo (drop-down combination) and so on. Users can combine these components can also be used alone one.
Easyui Each component has properties, methods and events. Users can easily extend to those components.
It is defined in the jQuery.fn. {Plugin} .defaults. For example, dialog attributes are defined in jQuery.fn.dialog.defaults.
Event (callback function) is defined in jQuery.fn. {Plugin} .defaults.
Method call syntax: $ ( 'selector') plugin ( 'method', parameter);.
among them:
The method is defined in jQuery.fn. {Plugin} .methods. Each method has two parameters: jq and param. The first parameter 'jq' is necessary, a reference to the jQuery object. The second parameter 'param' refers to the actual method parameters passed. For example, to extend dialog component method called 'mymove' approach, as follows:
$ .extend ($. Fn.dialog.methods, { mymove: function (jq, newposition) { return jq.each (function () { $ (This) .dialog ( 'move', newposition); }); } });
Now you can call 'mymove' method to move the dialog box (dialog) to the specified location:
$ ( '# Dd'). Dialog ( 'mymove', { left: 200, top: 100 });
Download Library, and references EasyUI CSS and JavaScript files in your page.
<Link rel = "stylesheet" type = "text / css" href = "easyui / themes / default / easyui.css"> <Link rel = "stylesheet" type = "text / css" href = "easyui / themes / icon.css"> <Script type = "text / javascript" src = "easyui / jquery-1.7.2.min.js"> </ script> <Script type = "text / javascript" src = "easyui / jquery.easyui.min.js"> </ script>
Once you reference EasyUI necessary files, you can define a EasyUI components through the use of tags or JavaScript. For example, to a top panel with a folding function, you need to write the HTML code as follows:
<Div id = "p" class = "easyui-panel" style = "width: 500px; height: 200px; padding: 10px;" title = "My Panel" iconCls = "icon-save" collapsible = "true"> The panel content </ Div>
When creating a component by marking, 'data-options' attribute is used to support the property name since Version 1.3 HTML5 compatible. So you can rewrite the above code as follows:
<Div id = "p" class = "easyui-panel" style = "width: 500px; height: 200px; padding: 10px;" title = "My Panel" data-options = "iconCls: 'icon-save', collapsible: true"> The panel content </ Div>
The following code shows how to create a bound combo box 'onSelect' event.
<Input class = "easyui-combobox" name = "language" data-options = " url: 'combobox_data.json', valueField: 'id', textField: 'text', panelHeight: 'auto', onSelect: function (record) { alert (record.text) } ">