Easyui Getting Started Guide

Source: Internet
Author: User
@ AuthorYHC all easyui components include attributes, methods, and events. You can simply extend them. attribute attributes are defined in jQuery. fn. {plugin }. in ults. for example, the attribute of the dialog box component [dialog] is defined in jQuery. fn. dialog. defaults. event (callback function...

@ Author YHC

All easyui components include attributes, methods, and events. You can simply extend them.


Attribute

The attribute is defined in jQuery. fn. {plugin}. defaults. For example, the attribute of the [dialog] component of the dialog box is defined in jQuery. fn. dialog. defaults.

Event
The event (callback function) is also defined in jQuery. fn. {plugin}. defaults.

Method
Call method Syntax: $ ('selector '). plugin ('method', parameter); I believe that everyone in $ ('selector ') Should Know About 'selector' as long as they have used jQuery. If you do not know it, we suggest you read jQuery first.


Where:


Selector is a jquery selector object.
Plugin is the plug-in name.
Method is the existing method corresponding to the plug-in.
Parameter is a parameter object. It can be an object, a string...
The method is defined in jQuery. fn. {plugin }. in methods, all methods have two parameters: jq and param. The first parameter 'jq' is required. This indicates the jQuery object, the second parameter 'param' refers to the real parameters of the input method. For example, to extend a method for the dialog component and name it 'mymove ', the code is like this:

 

 

$. Extend ($. fn. dialog. methods ,{
Mymove: function (jq, newposition ){
Return jq. each (function (){
$ (This). dialog ('move ', newposition );
});
}
});


Now you can call the 'mymove 'method to move the dialog box to the specified position .:

$ ('# Dd'). dialog ('mymove ',{
Left: 200,
Maximum: 100
});

JQuery EasyUI getting started
Download the js library and introduce the easyui CSS and Havascript files to your page.

 
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.