jQuery EasyUI 基础插件 - Droppable 可放置

jQuery EasyUI 教程 · 2019-04-07 11:18:17

通过 $.fn.droppable.defaults 重写默认的 defaults。

用法

通过标记创建可放置(droppable)区域。

<div class="easyui-droppable" data-options="accept:'#d1,#d3'" style="width:100px;height:100px;">
</div>

使用 javascript 创建可放置(droppable)区域。

<div id="dd" style="width:100px;height:100px;"></div>
$('#dd').droppable({
    accept:'#d1,#d3'
});

属性

名称 类型 描述 默认值
accept selector 确定将被接受的可拖动元素。 null
disabled boolean 如果设置为 true,则停止可放置(droppable)。 false

事件

名称 参数 描述
onDragEnter e,source 当可拖动元素被拖进来时触发。source 参数指被拖动的 DOM 元素。
onDragOver e,source 当可拖动元素被拖过时触发。source 参数指被拖动的 DOM 元素。
onDragLeave e,source 当可拖动元素被拖离开时触发。source 参数指被拖动的 DOM 元素。
onDrop e,source 当可拖动元素被放下时触发。source 参数指被拖动的 DOM 元素。

方法

名称 参数 描述
options none 返回选项(options)对象。
enable none 启用可放置功能。
disable none 禁用可放置功能。

点击查看所有 jQuery EasyUI 教程 文章: https://www.codercto.com/courses/l/42.html

查看所有标签

Web Design Index by Content 3 (Web Design Index)

Web Design Index by Content 3 (Web Design Index)

Pepin Press (EDT) / Pepin Press / 2007-11 / USD 29.99

Would you like an overview of the state of the art in web design in a specific field? WEB DESIGN INDEX BY CONTENT provides exactly that: every year, 500 new designs are selected and grouped in more th......一起来看看 《Web Design Index by Content 3 (Web Design Index)》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换