Home  >  Article  >  Web Front-end  >  jQuery EasyUI Tutorial-Droppable (Place)

jQuery EasyUI Tutorial-Droppable (Place)

黄舟
黄舟Original
2016-12-27 16:28:221289browse

The previous article introduced you to the jQuery EasyUI tutorial-Draggable plug-in. In addition to using the Draggable plug-in to drag any element, you can also call the Droppable UI plug-in to drag the dragged element. Place any element into the specified area, similar to a shopping cart effect.

Okay, let’s learn jQuery-Droppable (placement) next!

Use $.fn.droppable.defaults to override the default value object.

Use case:

Create a drop area through two methods: tags and Javascript.

1. Create a placement area through labels.

<div id=”dd” class=”easyui-droppable” data-options=”accept:’#d1,#d3′” 
style=”width:100px;height:100px;”></div>

2. Use Javascript to create a drop area.

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

Properties:

jQuery EasyUI Tutorial-Droppable (Place)

Events:

jQuery EasyUI Tutorial-Droppable (Place)

Methods:

jQuery EasyUI Tutorial-Droppable (Place)

The above is the content of the jQuery EasyUI tutorial-Droppable (placement). For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn