jquery-ui/tests/visual/droppable.html

41 lines
1.0 KiB
HTML
Raw Normal View History

2008-09-20 17:42:04 +00:00
<!doctype html>
<html lang="en">
<head>
<title>Simple Droppable</title>
<link rel="stylesheet" href="all.css" type="text/css">
<link rel="stylesheet" href="../../themes/base/ui.all.css" type="text/css">
2009-01-22 09:13:28 +00:00
<script type="text/javascript" src="../../jquery-1.3.1.js"></script>
2008-09-20 17:42:04 +00:00
<script type="text/javascript" src="../../ui/ui.core.js"></script>
<script type="text/javascript" src="../../ui/ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/ui.droppable.js"></script>
<script type="text/javascript">
$(function() {
$(".draggable").draggable();
$("#droppable").droppable({
accept: '.draggable',
drop: function(ev, ui) {
ui.draggable.css({ position: 'relative', top: 0, left: 0 }).clone().appendTo(this);
}
});
});
</script>
</head>
<body>
<ul class="plugins">
<li class="plugin">
2008-09-20 17:42:04 +00:00
Droppable
<div class="draggable">D</div>
<div class="draggable">R</div>
<div class="draggable">A</div>
<div class="draggable">G</div>
<div id="droppable">
DROP
<hr>
</div>
</li>
</ul>
</body>
</html>