Is there any suitable non-hacker way to add placeholder text in an empty sort? I do not mean the white space that appears when you drag an item over the sort. I mean text, for example, "Drop items here". which is displayed only when the list is empty.
I tried displaying my own placeholder, but I was not able to correctly update its visibility because the jQuery user interface does not send me any transitions or events when I drag the related drag and drop into the sortable one.
Edit: Code example: http://jsfiddle.net/RRnD8/
For some reason, the over event is fired in this code example. out is still not. But in real code, I can use change instead of over .
Edit 2: Hmm, the out event fires. But it starts before the drag item is removed from the sortable one. I fixed this with:
e.sortable({out: function () { setTimeout(realOutHandler.bind(this), 0); }});
Is there a cleaner way to do this?
panzi source share