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

jQuery EasyUI Tutorial-Droppable (Place)

黄舟
Release: 2016-12-27 16:28:22
Original
1330 people have browsed it

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>
Copy after login

2. Use Javascript to create a drop area.

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

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)!


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template