while using drag and drop operation in jquery ui giving error
We are using
<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>
and when i try to use drag and drop
$("#move").draggable();
$("#pp-you").droppable({
drop: function() { alert('dropped'); }
});
and when i try to drag it gives this error
开发者_StackOverflow社区 $.widget.prototype._trigger is undefined
return $.widget.prototype._trigger.call(this, type, event, ui);
You should try and check your HTML/Javascript with Firebug.
$("#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>
I've created a fiddle and it seems to work fine.
精彩评论