Brake not to drag on sortable

2

This week I got help from Lúcio Rubens with a question, he helped me with this code, to get the IDs of the clicked elements.

Now on top of this same code, I need to lock a UL so it will not allow more elements to be removed,

This is the working example, JSFiddle.

$(".items").sortable({
    connectWith: ".items",
    receive: function(event, ui) {
        var id_origem = ui.sender.attr("id"),
            id_clicado = ui.item.attr("id"),
            id_destino = $(this).attr("id");
    }
});
    
asked by anonymous 22.05.2015 / 19:18

1 answer

3

In the example in the link below, I inserted a block class to not allow it to be removed, so it receives the items but does not let them leave it.

link

    
22.05.2015 / 19:46