jquery-sortable-lists
jquery-sortable-lists copied to clipboard
Improve ignoreClass
How about adding a check for "ignoreClass"?
Now, if you use, for example, the plugin "chosen" in the elements of list, then all its elements also become movable.
Locally in jquery-sortable-lists.js (on mousedown event) I fixed it like this:
target.hasClass( setting.ignoreClass )
->
( target.hasClass( setting.ignoreClass ) || target.closest('.' + setting.ignoreClass).length )
It is little complicated. Cause target can have a lot of childs and it is too expensive to check all hierarchy for class name.
PS: target.hasClass is not necessary. closest() checks also the target element.