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

查看所有标签

Learning Vue.js 2

Learning Vue.js 2

Olga Filipova / Packt Publishing / 2017-1-5 / USD 41.99

About This Book Learn how to propagate DOM changes across the website without writing extensive jQuery callbacks code.Learn how to achieve reactivity and easily compose views with Vue.js and unders......一起来看看 《Learning Vue.js 2》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具