Ask HN: Best JavaScript drag-and-drop plugin?

5 points by bgriggs1 ↗ HN
We're migrating a Flex app to HTML and are currently considering drag-and-drop.

Considerations: obviously we want it to look great, but it also needs to be easy to tie in Ajax calls to drag events. We'd also like to enable this functionality with multiple UI areas.

Has anyone had good success with a particular plugin? Or is that a hopeless cause and we should just write our own?

We're trying to stick with jQuery for our overall framework.

We'd like to check on any feedback from HN before diving in.

3 comments

[ 4.1 ms ] story [ 18.7 ms ] thread
I've had lots of success with the draggable/droppable modules from jQuery UI. They cover a lot of tricky cases (don't start dragging unless the mouse has moved more than a few pixels, revert to original position if the drag fails, arrange draggables in to "groups" so they only interact with the correct droppables) and generally do everything I need straight out of the box.

The only problem I've had with them has been advanced code that needs to make independent modifications to the position of the draggable during the drag, but a post on their support forum solved that one for me: http://forum.jquery.com/topic/trying-to-manipulate-the-posit...

In the past I've used YUI 2's drag and drop to good effect, but jQuery UI's is much easier to get started with.

Awesome response, thanks a bunch!
I also like the simplicity of jQuery's modules. Take a look of what else they have, it's solid.

YUI has some really amazing things as well, but it's a bit bloated with too many options. You can probably drag and drop something in YUI about 50 different ways, which is neat, but in the end you'll only really need 1.