Sortable - How to prevent a certain item from being draggable
I have a list of items which I am using sortable. These are
essentially divs contained in parent containers that are sortable,
which is a basically 2 two-column layout
However I need to prevent certain items from being draggable :
- I do not want some items to be draggable
- I don't want to let the users drag all the div's to another columns
so that one of the columns is empty
I am able to identify the current item being dragged but how I can
stop if from being dragged or maybe revert it back to its original
position [so that the last item in the column can not be dragged and
the column won't be empty]. Contrary to its meaning, the "revert"
option is only used for smoothing the animation.
Is there anyone who has faced a similar situation ? The feature to
prevent certain items from being draggable
Thanks in advance
Irfan