bootstrap-html5sortable icon indicating copy to clipboard operation
bootstrap-html5sortable copied to clipboard

sortupdate event not destroyed

Open yottaline opened this issue 3 years ago • 1 comments

$('.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);
}

yottaline avatar Jan 26 '23 02:01 yottaline

$('.sortable').off().sortable('destroy'); works event.stopPropagation(); not working

yottaline avatar Jan 26 '23 02:01 yottaline