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移動到一個指定的位置: