0

我是 jquery 的新手。这是我的代码

  // let the gallery items be draggable
        $("li", $gallery).draggable({
            cancel: "a.ui-icon", // clicking an icon won't initiate dragging
            revert: "invalid", // when not dropped, the item will revert back to its initial position
            containment: "document",
            helper: "clone",
            cursor: "move"
        });

        // let the trash be droppable, accepting the gallery items
        $trash.droppable({
            accept: "#gallery > li",
            activeClass: "ui-state-highlight",
            drop: function (event, ui) {
                deleteImage(ui.draggable);
            }
        });

我想让这两个事件都直播。请帮助我如何以 .live 的形式声明这些事件。提前致谢。

4

0 回答 0