4
<title>jQuery UI Droppable - Default Demo</title>
5
<link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
6
<script type="text/javascript" src="../../jquery-1.3.2.js"></script>
7
<script type="text/javascript" src="../../ui/ui.core.js"></script>
8
<script type="text/javascript" src="../../ui/ui.draggable.js"></script>
9
<script type="text/javascript" src="../../ui/ui.droppable.js"></script>
10
<link type="text/css" href="../demos.css" rel="stylesheet" />
11
<style type="text/css">
12
#draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
13
#droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
15
<script type="text/javascript">
17
$("#draggable").draggable();
18
$("#droppable").droppable({
19
drop: function(event, ui) {
20
$(this).addClass('ui-state-highlight').find('p').html('Dropped!');
30
<div id="draggable" class="ui-widget-content">
31
<p>Drag me to my target</p>
34
<div id="droppable" class="ui-widget-header">
38
</div><!-- End demo -->
40
<div class="demo-description">
42
<p>Enable any DOM element to be droppable, a target for draggable elements.</p>
44
</div><!-- End demo-description -->