开发者

jQuery sortable receive events

I have an li list with jQuery sortable attached to it. But the receive function is never executed. When I drag list item 10 to the 2nd position the way I expect this code to execute is to execute the receive function. But it never gets executed. What am I doing wrong?

// Do the same for our playlist.
    $(".admin-left").sortable({
        opacity: '0.5',
        tolerance: "intersect",
        handle: ".handle",
        appendTo: 'appentToHolder',
        items: "li.admin-song",
        update: function(event, ui) {
            $(ui.item).css("opacity", "0.0").animate({ opacity: "1.0" }, "medium");
            if ($.browser.msie && $.browser.version == "7.0") {
                $(ui.item).css("margin-bottom", "-6px");
            }
        },
        receive: function(event, ui) {
            AddToLeftList(ui.item);
        },
        start: function(event, ui) {
            $(".admin-left li.ui-selected").removeClass("ui-selected");
            isDraggingSong = true;
            //soundManager.stopAll();
            //$(".btn-stop").removeClass("btn-stop");
        },
        stop: funct开发者_开发问答ion(event, ui) {
            CheckLeftList();

        },
        connectWith: '.sidebar-drop-box ul'
    }).selectable({ filter: 'li.admin-song', cancel: '.head *,.btn-stop,.btn-play,.notes,.btn-del,span.remove' }); // added .head * to fix bug# 1013


I'm assuming that update, start, stop and connectWith functions are all working properly. What does the AddToLeftList function look like?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜