开发者

jQuery UI draggable event handling

I want t开发者_运维问答o stop the revert event on a draggable element if that element has been dropped on a valid droppable object. How do I stop the revert from happening?


I'm assuming by "in the right place" you mean a droppable element. If that's the case, just use the revert option, set to 'invalid':

$("#drag").draggable({
    revert: 'invalid'
});

Here's a working example: http://jsfiddle.net/wKBRk/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜