官方文档有这么一段话:

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:

  1. $.extend($.fn.dialog.methods, {
  2. mymove: function(jq, newposition){
  3. return jq.each(function(){
  4. $(this).dialog('move', newposition);
  5. });
  6. }
  7. });

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

  1. $('#dd').dialog('mymove', {
  2. left: 200,
  3. top: 100
  4. });

这段话其实描述了easyui使用的基本思路,以及扩展的思路。jQuery.fn.{plugin}.defaults,jQuery.fn.{plugin}.defaults,jQuery.fn.{plugin}.methods 分别是三部分的定义位置,可以对这三个定义分别扩展(添加和重写)。

easyui容易被忽略掉的部分的更多相关文章

  1. 如何使用HttpClient来发送带客户端证书的请求,以及如何忽略掉对服务器端证书的校验

    最近要做客户端和服务器端的双向认证,在客户端向服务器端发送带证书的请求这里有一点问题,网上的例子大多都不太好使,于是找了github上httpclient源代码中的例子改造了一下,终于弄明白了 git ...

  2. git忽略掉文件权限检查

    有时 git diff 执行显示文件内容没变化,但是有 old mode xxx new mode,原因是文件的权限,被chmod变化了,这种变化也被 diff 识别出来了,让git忽略掉文件权限检查 ...

  3. Eclipse怎么忽略掉报错的js文件

    第一步,我们要先定位错误在哪里,选择菜单里window——show view——other,选择Problems. 第二步,点击有红叉的项目,在Problems视图中,可以看到是什么错,哪个文件夹中的 ...

  4. iOS sourceTree忽略掉必要的xcuserdata文件

    1.找到git对应的文件 git status 结果 会得到已经修改的文件. modified: Zing.xcodeproj/xcuserdata/tiny.xcuserdatad/xcscheme ...

  5. 使用Git如何优雅的忽略掉一些不必的文件

    熟悉使用Git之后发现,使用sourceTree来管理和开发项目会变得更高效,现在我用bitbucket管理自己的项目,它提供了私有的仓库,用起来还是比较爽,不过刚开始用的时候,只要一打开本地仓库的工 ...

  6. springMvc将对象json返回时自动忽略掉对象中的特定属性的注解方式

    1.注解使用在 类名,接口头上 @JsonIgnoreProperties(value={"comid"}) //希望动态过滤掉的属性 例 @JsonIgnorePropertie ...

  7. 如何让 Git 忽略掉文件中的特定行内容?

    近期在git遇到几个问题,让我重新认识到git的强大性,下面列出来记录一下 有一个数据库的配置文件,在用 git add 添加到 index file 时不能透露了相关配置.而如果用 .gitigno ...

  8. CSS以及JQuery总是忽略掉的小问题

    1.自动居中一列布局需要设置 margin 左右值设置为 auto,而且一定要设置width为一个定值. 2.css3: 3.修改时间SQL(格式) update table set timeColu ...

  9. gson 忽略掉某些字段不进行转换

    增加 transient 修饰进行解决,例如: private  transient final DecimalFormat df = new DecimalFormat("#0.00&qu ...

随机推荐

  1. Sprint第一个冲刺(第五天)

    一.Sprint介绍 今天我们主要做的是修复乱码,完善项目. 任务进度: 二.Sprint周期 看板: 燃尽图:

  2. 使用Costura.Fody将源DLL合并到目标EXE

    本文为原创文章,如转载,请在网页明显位置标明原文名称.作者及网址,谢谢! 一.本文主要是使用Costura.Fody工具将源DLL合并到目标EXE,因此,需要从以下任一链接下载: ①从Github地址 ...

  3. How to install cacti on centos 6

    Cacti – Network and performance monitoring tool   Cacti is one of best monitoring tool used to monit ...

  4. 搭建基于hyperledger fabric的联盟社区(五) --启动Fabric网络

    现在所有的文件都已经准备完毕,我们可以启动fabric网络了. 一.启动orderer节点 在orderer服务器上运行: cd ~/go/src/github.com/hyperledger/fab ...

  5. C语言函数返回值和变量类型

    前言 最近在刷题,在写矩阵的快速幂的题时,对于返回值是数组的程序,写的十分冗杂.借此机会,重新梳理下C语言中函数的返回值与变量类型的关系. 按照变量的寿命,可以分为三种类型 1.静态变量 寿命从程序开 ...

  6. h5调用手机摄像头/相册

    <!DOCTYPE HTML><html><head> <title>上传图片</title> <meta charset=" ...

  7. 怎样用java生成GUID与UUID

    GUID是一个128位长的数字,一般用16进制表示.算法的核心思想是结合机器的网卡.当地时间.一个随机数来生成GUID.从理论上讲,如果一台机器每秒产生10000000个GUID,则可以保证(概率意义 ...

  8. POJ 2549 Sumsets(折半枚举+二分)

    Sumsets Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11946   Accepted: 3299 Descript ...

  9. python的数据类型,数字,布尔,字符串

    1.数字 数字过大,类型会自动变化,这个变化是python2特有的,在python3里都是int,不区分int和long float(浮点型),也就是小数 complex(复数) 2.布尔值 真或者假 ...

  10. 【学习笔记】dp基础

    知识储备:dp入门. 好了,完成了dp入门,我们可以做一些稍微不是那么裸的题了. dp基础,主要是做题,只有练习才能彻底掌握. 洛谷P1417 烹调方案 分析:由于时间的先后会对结果有影响,所以c[i ...