我们正在使用
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"></script>
<script src="js/mousewheel.js" type="text/javascript"></script>
<script src="js/scrollpane.js" type="text/javascript"></script>
<script src="js/fancybox.js" type="text/javascript"></script>
<script src="js/tabs/js/tabs.js" type="text/javascript"></script>
<script src="js/jquery.tipsy.js" type="text/javascript"></script>
当我尝试使用拖放时
$("#move").draggable();
$("#pp-you").droppable({
drop: function() { alert('dropped'); }
});
当我尝试拖动时会出现此错误
$.widget.prototype._trigger is undefined
return $.widget.prototype._trigger.call(this, type, event, ui);
答案 0 :(得分:0)
您应该尝试使用Firebug检查您的HTML / Javascript。
$("#move").draggable();
$("#pp-you").droppable({
drop: function() {
alert('dropped');
}
});
#move {
width: 100px;
height: 100px;
background-color: red;
}
#pp-you {
width: 100px;
height: 100px;
background-color: green;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"></script>
<div id="move">try to move me</div>
<div id="pp-you">drop stuff here</div>
我创建了一个fiddle,似乎工作正常。