Home > Web Front-end > JS Tutorial > body text

jQuery EasyUI API Chinese Documentation - Documentation Document_jquery

WBOY
Release: 2016-05-16 18:01:35
Original
1151 people have browsed it

Each easyui component has properties, methods and events, and users can easily extend them.
Characteristics
Characteristics are defined in jQuery.fn.{plugin}.defaults. For example, the properties of dialog are defined in jQuery.fn.dialog.defaults.
Event
Event (callback function) is also defined in jQuery.fn.{plugin}.defaults.
Methods
Methods are defined in jQuery.fn.{plugin}.methods. Each method has two parameters: jq and param. The first parameter 'jq' is required and refers to the jQuery object. The second parameter 'param' refers to the actual parameter passed to the method. For example, extend a method named 'mymove' to the dialog component. The code looks like this:

Copy code The code is as follows :

$.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 Go to a specified location:
Copy the code The code is as follows:

$('#dd' ).dialog('mymove', {
left: 200,
top: 100
});
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template