johnny / johnny/jquery-sortable

Removing elements from DOM doesn't destroy sortable

Open
#106 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
1.5k
Forks
429
PR merge metrics
No merged PRs in 30d

Description

When a sortable is bound to group which is later removed from DOM (`$.remove()` or simply replaced), sortable is still bound to it if it's not manually destroyed before removing the elements from DOM. This messes up sortable when it's later bound to that group again.

Related to #99, and #94

If nothing else, it would be great to be able to `destroy` all sortables (or particular group). Calling `sortable('destroy')` on those non-existent DOM elements is futile.

[JSFiddle here](http://jsfiddle.net/SmRM2/1/)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.