Documentation

Each component of easyui has properties, methods and events. Users can extend them easily.

Properties

The properties is defined in jQuery.fn.{plugin}.defaults. For example, the dialog's properties is defined in jQuery.fn.dialog.defaults.

Events

The events(callback functions) is defined in jQuery.fn.{plugin}.defaults also.

Methods

The calling method syntax: $('selector').plugin('method', parameter);

Where:

  • selector is the jquery object selector.
  • plugin is the plugin name.
  • method is the existing method corresponding to the plugin.
  • parameter is the parameter object, can be a object, string, ...

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:

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

Getting Started with jQuery EasyUI

Download the library and include EasyUI CSS and JavaScript files on your page.

Once you've included the EasyUI necessary files, you can define an EasyUI component from markup or using JavaScript. For example, to define a panel with collapsible functionality, you can write the HTML code like this:

When creating a component from markup, the 'data-options' attribute can be used to support HTML5 compliant attribute names since version 1.3. So you can rewrite the code above as:

The code below shows how to create a combobox that bind 'onSelect' event.