Is there any way to have a jQuery sortable list show a placeholder for where the initial item was when you drag one out to sort?
i.e. when a user goes to move one of the LIs in my list, I want a rectangle outline to show where the one they’re dragging came from.
Short version: you can use sortable’s
startevent handler to reveal the original item, and modify its appearance however you like. E.g.:With the above, rather than your original item dissappearing when the user begins to drag, it will maintain its original position, and it will gain the ‘original-placeholder’.
What’s going on (as far as I can tell):
startfunction is run when the user begins to drag.I’m not particularly familiar with the internals, but I’d imagine others may be able to say more about how far one can push this technique.