3 ms·
My comment earlier was a bit strong; there are obviously cases when you just need to get the job done, and if jQuery UI covers your use case with an acceptable
by callum85 12y ago
My comment earlier was a bit strong; there are obviously cases when you just need to get the job done, and if jQuery UI covers your use case with an acceptable perf hit then go with it.
If you want a halfway house, I've just remembered this little jQuery plugin, not well known at all, but it is the best thing available:
http://threedubmedia.com/code/event/drag http://threedubmedia.com/code/event/drag
For me this plugin was a bridge between using DnD libraries and writing raw mouse listeners. It basically just fires off events at key points during a drag sequence, and it's up to you to update element styles to move them around... ie, you can't see anything physically happening on the page unless you update the DOM yourself (not difficult). It's basically sugar around mouse events to make them a lot less intimidating, eg, on each move it gives you the mouse position relative to wherever the drag started, so you don't have to keep track of this yourself.
Compared to any regular DnD library, it's better performing and miles more flexible. It's almost as good as doing it with raw mouse events. Look at the demos and view the code, they are impressive. It's old though. Hope it still works with modern jQuery.