只要它不是当前的可拖动对象,我就可以让 IE 删除对象。这适用于 Chrome 和 Firefox。有什么我做错了吗?
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://code.jquery.com/ui/jquery-ui-git.js"></script>
</head>
<body>
<ul id="list">
<li id="test-1" class="dropme">One</li>
<li id="test-2" class="dropme">Two</li>
</ul>
<div id="bucket" style="border:1px solid black">
<p>Drop items here and they should be removed.</p>
</div>
<script>
$("#list").sortable({
items: 'li'
});
$('#bucket').droppable({
drop: function(event, ui) {
$(ui.draggable).remove();
},
accept: '.dropme'
});
</script>
</body>
</html>