I would recommend you not to drag the sorted list, but listen to the receive
event for sorting to cancel the event:
$('div.products-list').sortable({ connectWith: '.products-list', placeholder: 'ui-state-highlight', items: 'div.product', revert: 200, receive: function(event, ui) { var prod_id = ui.item.attr("prod_id"); if ($(this).find(".product[prod_id='" + prod_id + "']").length > 1) { ui.sender.sortable("cancel"); } } });
Example: http://jsfiddle.net/z5X5y/
Andrew Whitaker
source share