<html lang="en">
<head>
<title></title>
<link type="text/css" href="js/themes/base/ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="js/ui/ui.core.js"></script>
<script type="text/javascript" src="js/ui/ui.draggable.js"></script>
<script type="text/javascript" src="js/ui/ui.droppable.js"></script>
<link type="text/css" href="js/demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$(".drag").draggable();
var dropOpts = {
accept: dragEnrol,
activeClass: "activated"
};
function dragEnrol(el) {
return (el.attr("id") == "drop1") ? true : false;
}
$("#target").droppable(dropOpts);
});
</script>
</head>
<body>
<div class="drag" id="drop1">drop1</div>
<div class="drag" id="drop2">drop2</div>
<div id="target">target</div>
</body>
</html>
|