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://codercto.com/courses/l/42.html

查看所有标签

Trading and Exchanges

Trading and Exchanges

Larry Harris / Oxford University Press, USA / 2002-10-24 / USD 95.00

This book is about trading, the people who trade securities and contracts, the marketplaces where they trade, and the rules that govern it. Readers will learn about investors, brokers, dealers, arbit......一起来看看 《Trading and Exchanges》 这本书的介绍吧!

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

URL 编码/解码

SHA 加密
SHA 加密

SHA 加密工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具