JQuery在移动设备上拖放

时间:2013-02-22 12:09:19

标签: jquery mobile drag-and-drop

我有一张图片,我使用此库应用.draggablle()选项:https://github.com/furf/jquery-ui-touch-punch

但是我的图片仅在其父级的范围内拖动。我希望'能够在整个页面上拖动图像。这不起作用:$(thumb).draggable({ containment: "document"});

CODE:

var thumb = dojo.create(
                    "img",
                    {
                        draggable: "true",
                        alt: label,
                        id: "dhmvseries_" + label,
                        dhmvseriesuuid: label,
                        ondragstart: thumbDragStart,
                        ondragend: thumbDragEnd,
                        onmouseenter: displayThumbInfo,
                        onmouseout: hideThumbInfo

                    },
            thinner,
                    "first"
                    );

       $(thumb).draggable({ containment: "window"});

0 个答案:

没有答案