I’ve got 3 UL lists that are using sortable jquery.ui.
All works great, but the client has decided that she wants a few li’s locked in position.
All good, I’ve used:
items: "li:not(.ui-state-disabled)",
In my jquery sortable call.
I then applied a class=”ui-state-disabled” to any list items I don’t want to be moved.
works a treat!
However,
When I re-order the list, the generated data of the new structure ignores the disabled list items.
Makes sense on some level as it is, well, disabled, but I still need to capture the reference ID as I need to know where the locked item lives in the hierarchy.
does anyone know if it’s possible to tell teh sortable list item, dont move, but still stay visible to the DOM.
Google is not my friend today…
Tris..
I’ve fixed my own problem.
Took a little trial and error, but it’s down to stop and before stop
I’ve only tested it in FF, but that’s fine for me.
Here’s my updated code: