bootstrap-html5sortable
bootstrap-html5sortable copied to clipboard
sortupdate event not destroyed
$('.sortable').sortable('destroy') doesn't destroy the sortupdate event
When I destroy it and make it stortable again with an update event it runs multiple times
Check my case here for a scroll loader
function load(){
// load new products with ajax
// append products to '.sortable' container
$('.sortable').sortable('destroy');
$('.sortable').sortable({
items: ':not(.d-none)',
placeholderClass: 'col-12 col-sm-4 col-md-3',
handle: '.product-box',
}).bind('sortupdate', sortUpdate);
}
$('.sortable').off().sortable('destroy'); works
event.stopPropagation(); not working