Each component of easyui has properties, methods and events. Users can extend them easily.jquery
每一个easyui组件都有特性(property)、方法(method)和事件(event),用户能够很容易地扩展它们。web
The properties is defined in jQuery.fn.{plugin}.defaults. For example, the dialog's properties is defined in jQuery.fn.dialog.defaults.函数
属性在jQuery.fn.{plugin}.defaults里定义。例如, dialog的特性在jQuery.fn.dialog.defaults里定义。ui
The events(callback functions) is defined in jQuery.fn.{plugin}.defaults also.this
事件(回调函数)也在jQuery.fn.{plugin}.defaults里定义。spa
The calling method syntax: $('selector').plugin('method', parameter);翻译
Where:code
调用方法的语法:$('selector').plugin('method', parameter);component
其中:orm
The methods is defined in jQuery.fn.{plugin}.methods. Each method has two parameters: jq and param. The first parameter 'jq' is required, which refers to that jQuery object. The second parameter 'param' refers to the really parameter that pass through the method. For example, to extend a method named 'mymove' for the dialog component, the code looks like this:
方法在jQuery.fn.{plugin}.methods里定义。每一个方法有两个参数:jq和param。第一个参数'jq'是必须的,它是指jQuery对象。第二个参数'param' 是指传递给方法的真正的参数。例如,给dialog组件扩展一个名叫'mymove' 的方法,代码看起来就像这样:
Now you can call 'mymove' method to move the dialog to specified position:
如今你能够调用'mymove'方法把dialog移动到一个指定的位置: