jQueryUI拖拽效果_拖拽div的值到table表格里面

jQueryUI拖拽效果_拖拽div的值到table表格里面3890
//拖拽复制体
    $('td[id^="draggable"]').draggable({
        helper: "clone",
        cursor: "move"
    });

    //释放后
    $('td[id^="target"]').droppable({
        drop: function (event, ui) {
            $(this).children().remove();
            var source = ui.draggable.clone();
            $('<img/>', {
                src: 'btn_.png',
                style: 'display:none',
                click: function () {
                    source.remove();
                }
            }).appendTo(source);


            source.mouseenter(function () {
                $(this).find("img").show();
            });

            source.mouseleave(function () {
                $(this).find("img").hide();
            });

            $(this).append(source);

        }
    });

也许你还喜欢