开发者

jQuery modal plus drag and drop

I am using jQuery to build a magentic refrigerator game where you create sentences from the word bank. I have a list of 90+ words. I would like for the user to be able to open the word bank in a draggable modal and then drag each word from the modal to the main content div. The issue I am having is that I can only keep the words inside the modal. When I go past the modal border the draggable is constrained to the modal. Any help would be appreciated. I tried

$("#draggable").draggable({ containment: '#demo' });

With demo being the main content div and the modal div id is "di开发者_Python百科alog"


This is one article I wrote a while ago exactly about how to sue draggable and droppable.

it's got code and examples you might find useful on it.

http://www.placona.co.uk/blog/post.cfm/a-more-elaborated-jquery-drag-drop-cloning

Hope it helps

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜