Having troubles with items property of connected sortables.
What I’m trying to do is to disable items dragging using CSS selector passed (using :not option):
.sortable({
items: ":not(.disabledItem)"
});
It works fine, however, whenever I:
- remove ‘disabledItem’ class from item
- drag it around (without dragging everything works fine)
- reapply ‘disabledItem’ class
it doesnt get disabled again, even though it has ‘disabledItem’ class attached.
JsFiddle example:
http://jsfiddle.net/LZsT6/
Hiya here you go working demo: http://jsfiddle.net/tBKP6/1/
Feel free play around with the jsfiddle, instead of :not I have used cancel you can read further detail in the documentation. http://jqueryui.com/demos/sortable/items.html && And don’t forget to accept the answer 🙂
Jquery Code