jQuery EasyUI Basic Plugin -Droppable


jQuery EasyUI 插件jQuery EasyUI Plugins

Override the default defaults via $.fn.droppable.defaults.

Usage

Create a droppable area via markup.

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

Create a droppable area using javascript.

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

Properties

Name Type Description Default Value
accept selector Determine which draggable elements will be accepted. null
disabled boolean If set to true, stops the droppable. false

Events

Name Parameters Description
onDragEnter e,source Triggered when a draggable element is dragged in. The source parameter refers to the dragged DOM element.
onDragOver e,source Triggered when a draggable element is dragged over. The source parameter refers to the dragged DOM element.
onDragLeave e,source Triggered when a draggable element is dragged away. The source parameter refers to the dragged DOM element.
onDrop e,source Triggered when a draggable element is dropped. The source parameter refers to the dragged DOM element.

Methods

Name Parameters Description
options none Returns the options object.
enable none Enable the droppable functionality.
disable none Disable the droppable functionality.

jQuery EasyUI 插件jQuery EasyUI Plugins Other Extensions