开发者

Restricting the drop area with jQuery UI draggable()

jquery:

$('#divDroppable div').draggable({
    appendTo: "div.mainContainer div",
    revert: true,
    containment: $("div.mainContainer > div" ), 
    helper: "clone"
    //drop: handleCardDrop
    //cursor: "move"
    //snap: 'div.mainContainer div'
});

How do I restrict the dropped item to div.mainContainer > div? Otherwise, it should revert to the original place. The helper class is also not worki开发者_StackOverflowng properly.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜