Hello everyone. I wonder if it's possible to lock an element in a list.
For example, I've got a list that I can sort :
<ul>
<li>...</li>
<li>...</li>
<li class='locked'>...</li>
</ul>
I used the filter to my .locked element but the others <li> can be positioned below my .locked element.
Is there a way to prevent this ?
Thanks !
Create example on jsbin.com (draft)
Thanks for your reply.
As you can see on this JS Bin I can drag my first li under my .locked li.
I'd like to keep my .locked li always at the end of my ul. Is there a way to do this with the library?
onMove:function (evt) {
if (evt.related)
{
return !evt.related.classList.contains('locked');
}
}
hope can help you.
It works fine ! Exactly what I need ! Thanks !
onMove:function (evt) { if (evt.related) { return !evt.related.classList.contains('locked'); } }hope can help you.
Thank you for your solution.
Most helpful comment
hope can help you.